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

DefaultValue PropertyGridItemColor

 Post Reply Post Reply
Author
Message
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Topic: DefaultValue PropertyGridItemColor
    Posted: 11 May 2009 at 8:25am
Hi,
 
I'm trying to set Item.DefaultValue of PropertyGridItemColor to same value as Item.Value
But it's not working so well...
 
This is what I do:
 
Load settings of PropertyGrid items from XML file. After loading the settings I would like to set the .DefaultValue the same as .Value because it looks like properties has been changed (I have HighLightChangedItems = True).
 
This doesn't work: Item.DefaultValue = Item.Value
 
How can I get this to work?
 
Thanks a lot in advance
 
 
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....
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2009 at 1:51pm
    Dim ColorItem As PropertyGridItemColor
    Set ColorItem = Category.AddChildItem(PropertyItemColor, "ColorItem", RGB(10, 20, 30))
    
    'change color to something else
    ColorItem.Value = RGB(255, 204, 0)
    ColorItem.EditorStyle = ItemColorPopup
   
    Dim lRed As Long
    Dim lGreen As Long
    Dim lBlue As Long
   
    lRed = ColorItem.Value And 255
    lGreen = (ColorItem.Value \ 256) And 255
    lBlue = (ColorItem.Value \ 65536) And 255
   
    ColorItem.DefaultValue = lRed & "; " & lGreen & "; " & lBlue
Back to Top
Aaron View Drop Down
Senior Member
Senior Member
Avatar

Joined: 29 January 2008
Status: Offline
Points: 2192
Post Options Post Options   Thanks (0) Thanks(0)   Quote Aaron Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2009 at 2:19pm
Hi,
 
This will do for now. Would be nice if (in near future) something would change with DefaultValue <> Value types. I'm having some problems with this but I will open ticket for this and maybe it will be solved somehow
 
Thank you
 
  
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....
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 11 May 2009 at 2:39pm
I'll notify Oleg when the issue comes in. 
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.203 seconds.