|
|
| Re: ENUMLIST in IDLitComponent::RegisterProperty [message #39423 is a reply to message #39415] |
Wed, 19 May 2004 12:44  |
Chris[2]
Messages: 39 Registered: August 2003
|
Member |
|
|
Hi Sean,
The way to do this is to just change the value of the property itself. For
example, in your case, I assume you have some member data in your object,
say "self.people" (which I assume is an integer).
So in your ::Init method, you could just set "self.people=2", and the
initial setting of the property will then be 2, which will correspond to
"Harry".
You can do this for any property, not just registered properties, and not
just enumlists.
Now, as an aside, you can also mark a property as "Undefined", using the
UNDEFINED keyword to ::RegisterProperty. It won't change the actual property
value, but in the property sheet it will appear as if nothing was selected.
If you do this, you will need to programmatically set it back to "defined".
The property sheet won't do it for you. See IDLitComponent::RegisterProperty
for details.
-Chris
Research Systems, Inc.
"Sean Dettrick" <sdettrick@hotmail.com> wrote in message
news:c233c3ea.0405181254.319e4ab9@posting.google.com...
> Hi,
> I have a quick question.
>
> Has anybody come up with a way to give an ENUMLIST property an initial
> value which is NOT zero? E.g. if:
>
> LIST=['Tom','Dick','Harry']
> self -> IDLitComponent::RegisterProperty, 'PEOPLE', $
> ENUMLIST=LIST, $
> NAME='Friends'
>
> The default setting will be 'Tom'. Is it possible to change the
> DEFAULT setting, without changing the order of LIST?
>
> Thanks,
> Sean
|
|
|
|