![]() |
Inplacebutton for readonly properties |
Post Reply
|
| Author | |
dimdar
Groupie
Joined: 11 July 2007 Status: Offline Points: 34 |
Post Options
Thanks(0)
Quote Reply
Topic: Inplacebutton for readonly propertiesPosted: 19 May 2009 at 10:53am |
|
Hi,
I use the property control for display many properties that are not changeable by users and many property display a directory path like C:\windows; c:\documents\data\; \\serv2\users, etc. I need to put a button for open the path on explorer without do a copy and paste of it, so, I have added a button that open the folder with shell command but the buttons are not show if readonly property i set on true. I can I do it?
|
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
Posted: 19 May 2009 at 12:58pm |
|
Hi,
You can enable/disble inplacebutton directly:
Set propItem = Item.AddChildItem(PropertyItemString, "PropertyItemString", "abc")
propItem.InplaceButtons.Add 1 propItem.InplaceButtons(1).Enabled = False
Or
With V13.0:
wndPropertyGrid.FindItem(ID_PROPGRIDITEM).InplaceButtons.FindButton(ID_INPLACEBUTTON).Enabled = False (or True)
|
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
dimdar
Groupie
Joined: 11 July 2007 Status: Offline Points: 34 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2009 at 3:37am |
Hi,
Already done but the button is missing and not visible and disabled. When property is readonly the InplaceButtons are not draw.
Try this:
Set propItem = Item.AddChildItem(PropertyItemString, "PropertyItemString", "abc")
propItem.ReadOnly = True
propItem.InplaceButtons.Add 1 propItem.InplaceButtons(1).Enabled = True |
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2009 at 4:36am |
|
Hi,
You can try this instead:
Set propItem = Item.AddChildItem(PropertyItemString, "PropertyItemString", "abc")
propItem.Flags = 0 propItem.InplaceButtons.Add 1 propItem.InplaceButtons(1).Enabled = True propItem.CaptionMetrics.ForeColor = vbGrayed 'Now it looks the same as ReadOnly = true
![]() |
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
dimdar
Groupie
Joined: 11 July 2007 Status: Offline Points: 34 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2009 at 4:47am |
|
Hi,
It seem to work but with Item.Flags = 0 I lost the possibility to do copy of the property value.
![]() |
|
![]() |
|
Aaron
Senior Member
Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
Quote Reply
Posted: 20 May 2009 at 7:33am |
|
Hi,
You can't have it all
![]() I'm not fond of rightclick standard popup menu anyway so... You can add own popup menu and add copy / paste functions yourself but that's your choise.
|
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
![]() |
|
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 |