Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Possible to hide the category?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Possible to hide the category?

 Post Reply Post Reply
Author
Message
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Topic: Possible to hide the category?
    Posted: 29 July 2008 at 6:58am
I would like to use the grid without a category. I usually have only one category, and the left and top category margins and the empty category caption waste screen space and don't look good (see screen shot).

Is it possible to hide the category somehow?


Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 29 July 2008 at 8:19am
Hi,
 
add grid.SetPropertySort(xtpGridSortNoSort);
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 29 July 2008 at 8:44am
Hi, Oleg

that's a nice one. Works well.
I combined it with the other tip from

https://forum.codejock.com/forum_posts.asp?TID=10300&KW=margin

to hide the left margin which remains if the category itself is not shown.

Perhaps we could somehow add this as a built-in feature to one of the upcoming versions of XTP?
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 27 June 2011 at 12:31pm
Unfortunately this trick no longer works with recent XTP releases.
Any other work-around?

The margin trick still works but the [+] button is visible even if there is only one category.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 28 June 2011 at 6:09am
You still have SetPropertySort(xtpGridSortNoSort); ?
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
MacW View Drop Down
Senior Member
Senior Member


Joined: 26 June 2007
Status: Offline
Points: 253
Post Options Post Options   Thanks (0) Thanks(0)   Quote MacW Quote  Post ReplyReply Direct Link To This Post Posted: 30 June 2011 at 3:35pm
Yes.
I can shift the contents to the left with the negative margin, but the "top"-group is always visible:




Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 07 July 2011 at 7:20am
Hi,

Its not default behavior - should be something you customized in own code. Try reproduce wit our sample.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.143 seconds.