comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: change background color in widget_text
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: change background color in widget_text [message #74844] Wed, 02 February 2011 15:52
Adam Lefkoff is currently offline  Adam Lefkoff
Messages: 3
Registered: July 2010
Junior Member
if you happen to be on linux, a Widget_Table() with a single cell, and no row
or column headers looks and acts (somewhat) just like a single line, editable
text widget with the added bonus that you can set the colors for the foreground
and background of a table cell. I use this workaround all the time when I need
to control the foreground/background color for text entry... Sadly, this hack
doesn't work for Windows because no matter what your table size, you always get
the dreaded horizontal/vertical scroll bars (even if there is nothing to
scroll) which makes your cell very un-"text widget like"...

Being able to change the foreground/background color of the text in a text
widget (and a label, too, of course), just like you already can with the text
in a cell of a Widget_Table() would be ideal.

cheers,

Adam

On 2/2/2011 2:31 PM, clrussell wrote:
> Hi, Does anyone know how you go about changing the background color in
> a text widget from the default gray. Or change the color of the text.
> What I need is to be able to highlight or fill the text widget with
> either red or green. Any suggestions? Thanks so much! Cindy
Re: change background color in widget_text [message #74845 is a reply to message #74844] Wed, 02 February 2011 15:48 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> It's not going to happen.* Sorry. :-(
>
> Cheers,
>
> David
>
> * Unless you hit onto some incredible hack that hasn't been
> thought of yet. Plenty of people have tried, though.

It just occurred to me that Dick Jackson had a pretty
good hack for this. I even wrote up an article about it.
It's pretty old now, but there might be some good ideas
there:

http://www.dfanning.com/widget_tips/colorbuttons.html

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
Re: change background color in widget_text [message #74852 is a reply to message #74845] Wed, 02 February 2011 14:16 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
clrussell writes:

> Hi, Does anyone know how you go about changing the background color in
> a text widget from the default gray. Or change the color of the text.
> What I need is to be able to highlight or fill the text widget with
> either red or green. Any suggestions?

It's not going to happen.* Sorry. :-(

Cheers,

David

* Unless you hit onto some incredible hack that hasn't been
thought of yet. Plenty of people have tried, though.

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: new graphics legend
Next Topic: Coyote Graphics Update, Wed 2 Feb

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:22:17 PDT 2025

Total time taken to generate the page: 0.00363 seconds