Re: PropertySheet Widget Question [message #36382 is a reply to message #36372] |
Fri, 12 September 2003 07:47  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
David Fanning writes:
> I want to set the font type. I have three choices:
> Hershey, Hardware, and True-Type. I've used an
> enumerated property:
>
> self->RegisterProperty, 'FONT', 9, NAME="Font Type", $
> ENUMLIST=['Hershey', 'Hardware', 'True-Type']
>
> But on the property sheet, the list shows up blank
> initially. The three choices are there. And it works
> correctly, but I just don't see the initial selection.
> I see the initial selection appears on iTools enumerated
> lists, so I know it is possible. But two hours of looking
> hasn't been of much help. Does anyone know how to do this?
I ask questions on this newsgroup so infrequently that
it seems a shame to answer my own question, but there you go...
Thanks to the guys at RSI, who appear to get to work
even before I do, I've figured out what my problem
was. It's the ol' Hershey font is -1 instead of the
normal 0 for the default case problem. If the initial value
of an ENUMLIST property is -1, then it doesn't put anything
into its "default value" space initially.
Now I've got it all sorted out and the property widget
works like a champ. I'll be working on a training program
today, though, to get all my users used to using FONT=0
if they want a Hershey font. :^)
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|