Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - assign  value to .PropertyItemEnum
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

assign value to .PropertyItemEnum

 Post Reply Post Reply
Author
Message
kippa View Drop Down
Newbie
Newbie


Joined: 05 June 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote kippa Quote  Post ReplyReply Direct Link To This Post Topic: assign value to .PropertyItemEnum
    Posted: 05 June 2007 at 9:01pm
Hi,
I can add constraints to a item .PropertyItemEnum, but how can I assign a value to this item?
if an object property has one of the constraints value of the Pgrid item how can I have it selected or set for the item?
.value doesn't work (VB2005)

thanks
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: 06 June 2007 at 1:15am
Hi,
 
Think you didn't specify values for contrstrants.
 

Category.AddChildItem(PropertyItemType.PropertyItemEnum, "Language")

Item.Constraints.Add("Neutral", 0)

Item.Constraints.Add("Arabic", 1)

Item.Constraints.Add("German", 2)

Item.Constraints.Add("Chinese(Taiwan)", 3)

Item.Constraints.Add("English (United States)", 4)

Item.Constraints.Add("France", 5)

Item.Constraints.Add("Russian", 6)

Item.Value = 3

 
it works for me.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
kippa View Drop Down
Newbie
Newbie


Joined: 05 June 2007
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote kippa Quote  Post ReplyReply Direct Link To This Post Posted: 06 June 2007 at 8:06am
Thanks,
but it means that I have to use a cycle for (or similar) to compare all the item in the list. And if the value is not among them I have to add it, right?.
it is not like the combobox control, where you can just assign a text property.
Ok. thanks again
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.