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
------------------------------------------------------------ ---------
|
|
|