Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Data property of selected constraint
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Data property of selected constraint

 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: Data property of selected constraint
    Posted: 15 December 2005 at 9:13am
If I have added a contstraint to an item with the data property set, and I want to later retrieve the data value for the selected constraint, how do I do it?

is it item.constraints.something?

or does some property of the item changes when the constraint is chosen?

or do I have to go through and compare the item's constraints with it's current value, and get the index that way? 
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: 16 December 2005 at 4:22am

Best way is to use PropertyItemEnum type of items.

See our Sample

    Set ItemEnum = Category.AddChildItem(PropertyItemEnum, "Enum", 2)
   
    'Adds some constraints along with a Data value
    ItemEnum.Constraints.Add "Windows 98", 1
    ItemEnum.Constraints.Add "Windows 2000", 2
    ItemEnum.Constraints.Add "Windows XP", 3

In this case ItemEnum.Value equal Selected constraint.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2006 at 1:35pm
When using this method, it seems the value returned by ItemEnum.Value would be "Windows 2000".  How do you retrieve the value "2" when a user would select "Windows 2000" from the dropdown?

I'm using 9.81 ActiveX with VB6
Back to Top
jcollier View Drop Down
Senior Member
Senior Member


Joined: 15 February 2006
Status: Offline
Points: 250
Post Options Post Options   Thanks (0) Thanks(0)   Quote jcollier Quote  Post ReplyReply Direct Link To This Post Posted: 20 March 2006 at 1:44pm
Nope.  My mistake.  When using PropertyItemEnum value returns the Data value.  I should have paid more attention.
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.