Re: widget_text, CW_FIELD [message #59274] |
Tue, 18 March 2008 01:19  |
Rajiv.Paneerselvam
Messages: 14 Registered: November 2005
|
Junior Member |
|
|
On Mar 17, 4:23 pm, "mgal...@gmail.com" <mgal...@gmail.com> wrote:
> On Mar 17, 8:26 am, steverajiv <Rajiv.Paneersel...@gmail.com> wrote:
>
>> Hi all,
>> I am developing a macro language text editor using IDL.
>> I have the following questions:
>> 1)Is there any way to add colors to the texts displayed using
>> 'widget_text' or 'CW_field' .? (using direct graphics)
>> 2)Can I use IDL Object Graphics (eg,'IDLgrText' ) to change text color
>> and display the colored text in the text space created by
>> 'widget_text'.
>
> You can't use the graphics systems with WIDGET_TEXT. I can think of
> two alternatives (not for the faint of heart):
>
> * create a WIDGET_DRAW instead of a WIDGET_TEXT and output your text
> into it. If this is the main editing window of your text editor, good
> luck. But for a label or single line somewhere it is not too bad.
> There are keywords to WIDGET_INFO to get the right background color,
> font, width of a given string in pixels, etc.
>
> * if on Unix, use Xdefaults.
>
> I don't see any reasonable "IDL only" solutions if you are trying to
> chromo-code the code in your macro language text editor. Maybe there's
> something you could use with WIDGET_ACTIVEX if you are on Windows?
>
> Mike
> --www.michaelgalloy.com
> Tech-X Corporation
> Software Developer II
Thank you all for your useful suggestions, more questions..(to
Mr.Mike)
1. How can I add texts to 'widget_draw'? Even if I can add texts to
widget_draw, Can I make the text space editable.
2. how can I use 'WIDGET_ACTIVEX' to chromo-code the editor?,can you
please explain this in detail?
regards,
Rajiv
|
|
|