![]() |
Feature suggestion |
Post Reply ![]() |
Author | |
TimStowe ![]() Newbie ![]() ![]() Joined: 03 November 2005 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() 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).
|
|
![]() |
|
gshawn ![]() Senior Member ![]() Joined: 04 October 2004 Status: Offline Points: 227 |
![]() ![]() ![]() ![]() ![]() |
cool... I would also be able to use this feature :)
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello, just don't set ItemHasEdit flag: Set Item = Category.AddChildItem(PropertyItemColor, "ToolbarColor", &HAA00FF) |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
TimStowe ![]() Newbie ![]() ![]() Joined: 03 November 2005 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() |
Oleg,
I've done that, and it still allows editing in the item. |
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hello, Show your code. it must work. |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
TimStowe ![]() Newbie ![]() ![]() Joined: 03 November 2005 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() |
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 |
|
![]() |
|
TimStowe ![]() Newbie ![]() ![]() Joined: 03 November 2005 Status: Offline Points: 18 |
![]() ![]() ![]() ![]() ![]() |
Wait a minute... I'm a moron. Just figured it out.
Disregard that previous code snippet. |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |