Re: Color text within WIDGET_TEXT? [message #29143] |
Sun, 03 February 2002 14:29 |
Andrew Cool
Messages: 219 Registered: January 1996
|
Senior Member |
|
|
Chia Chang wrote:
>
> I am looking to spice up my text widget.
> Is there a way to make it display color text.
>
> Regards,
> Chia Chang
Hi,
The answer here is probably platform dependent.
Under VMS, it's all too easy by defining X Resources in your
.IDLDE file.
It's taken a coupla minutes to knock up a little text widget
that had a green background in the text entry field, and the colour of
the text that I typed in was red. Gross combination!
I guess the same should work on *NIXy things running X.
Example :
PRO text_widget
base = widget_base(Resource_name='widgettext')
Text_id = widget_text(base,Value=' ',/Edit,$
Resource_name = 'frequency')
Widget_control,base,/real
END
Entries in .IDLDE file:
Idl*widgettext*frequency*Background:green
Idl*widgettext*frequency*Foreground:red
HTH,
Andrew
------------------------------------------------------------ ---------
Andrew D. Cool .->-.
Electromagnetics & Propagation Group `-<-'
Surveillance Systems Division Transmitted on
Defence Science & Technology Organisation 100% recycled
PO Box 1500, Salisbury electrons
South Australia 5108
Phone : 061 8 8259 5740 Fax : 061 8 8259 6673
Email : andrew.cool@dsto.defence.gov.au
------------------------------------------------------------ ---------
|
|
|
Re: Color text within WIDGET_TEXT? [message #29146 is a reply to message #29143] |
Sun, 03 February 2002 08:10  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Chia Chang (chia@photon.com) writes:
> I am looking to spice up my text widget.
> Is there a way to make it display color text.
IDL is not really into "spice", I'm afraid. You
would be further ahead spending your time learning
sexy new pick-up lines.
"My, that's a bold looking widget you have there."
Cheers,
Miss Manners
--
David W. Fanning, Ph.D.
Fanning Software Consulting
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
|
|
|