Re: color buttons [message #7913] |
Sun, 26 January 1997 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Ding Wu <dwu@larry.cc.emory.edu> writes:
> Anyone knows how to make color buttons in IDL like other languages.
> Off course we can use widget_draw to make 'color buttons', but that's not
> what I want. (because draws looks ugly, also several pixel away from
> alignment with other buttons).
Well, I guess one person's "ugly" is another person's pride and joy.
If anyone is interested in an ugly draw widget button, I have an
example of one on my anonymous ftp site. It is basically
a compound widget in which a "button" is drawn in a draw widget.
It behaves like a button, changing colors when it is "pushed",
returning true button event structures, etc.
It is located at ftp.frii.com in the directory:
/pub/dfanning/outgoing/idl_examples/color_button.pro
Compile it and exersize it by typing "test":
IDL> .compile color_button
IDL> test
As Ding Wu points out, it is not the *perfect* solution, but
it has worked for me in a pinch.
And as Mark Rivers points out, a better solution for color buttons
if you are running on a UNIX system is to use X resources.
David
-----------------------------------------------------------
David Fanning, Ph.D.
Fanning Software Consulting
2642 Bradbury Court, Fort Collins, CO 80521
Phone: 970-221-0438 Fax: 970-221-4762
E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com
-----------------------------------------------------------
|
|
|