Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Feature suggestion
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Feature suggestion

 Post Reply Post Reply
Author
Message
TimStowe View Drop Down
Newbie
Newbie
Avatar

Joined: 03 November 2005
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote TimStowe Quote  Post ReplyReply Direct Link To This Post Topic: Feature suggestion
    Posted: 17 February 2006 at 10:30am
It'd be very useful to be able to lock a property grid item but still be able to use the buttons - sort of a variation on read only.  This way, the user is forced to use the color picker, rather than manually enter the color code (and possibly screw it up).
Back to Top
gshawn View Drop Down
Senior Member
Senior Member


Joined: 04 October 2004
Status: Offline
Points: 227
Post Options Post Options   Thanks (0) Thanks(0)   Quote gshawn Quote  Post ReplyReply Direct Link To This Post Posted: 17 February 2006 at 10:43am
cool... I would also be able to use this feature :)
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: 20 February 2006 at 10:44am

Hello,

just don't set ItemHasEdit flag:

Set Item = Category.AddChildItem(PropertyItemColor, "ToolbarColor", &HAA00FF)
Item.Flags = ItemHasComboButton

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
TimStowe View Drop Down
Newbie
Newbie
Avatar

Joined: 03 November 2005
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote TimStowe Quote  Post ReplyReply Direct Link To This Post Posted: 22 February 2006 at 7:20am
Oleg,

I've done that, and it still allows editing in the item. 
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: 23 February 2006 at 8:01am

Hello,

Show your code. it must work.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
TimStowe View Drop Down
Newbie
Newbie
Avatar

Joined: 03 November 2005
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote TimStowe Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2006 at 8:14am
Oleg, this code allows the user to type into that field.  Whatever they add to that field disappears as soon as the field loses focus, but they can still type there.




  Dim pgiColorDesc As PropertyGridItem
  Dim pgiColorItem As PropertyGridItem
 
  On Error GoTo ErrorHandler

  Set pgiColorDesc = pgiCategory.AddChildItem(PropertyItemString, sParentCaption)
  pgiColorDesc.ReadOnly = True
  Set pgiColorItem = pgiColorDesc.AddChildItem(PropertyItemColor, lblBackColor.Caption)
  pgiColorItem.Value = lBackColor
  Set pgiColorItem = pgiColorDesc.AddChildItem(PropertyItemColor, lblForeColor.Caption)
  pgiColorItem.Value = lForeColor
  pgiColorItem.flags = ItemHasComboButton
  pgiColorDesc.CaptionMetrics.BackColor = lBackColor
  pgiColorDesc.CaptionMetrics.ForeColor = lForeColor
  pgiColorItem.EnsureVisible




 
Back to Top
TimStowe View Drop Down
Newbie
Newbie
Avatar

Joined: 03 November 2005
Status: Offline
Points: 18
Post Options Post Options   Thanks (0) Thanks(0)   Quote TimStowe Quote  Post ReplyReply Direct Link To This Post Posted: 23 February 2006 at 9:44am
Wait a minute...  I'm a moron.  Just figured it out.

Disregard that previous code snippet.
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.156 seconds.