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

Home » Public Forums » archive » Re: color buttons
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: color buttons [message #7913] Sun, 26 January 1997 00:00
davidf is currently offline  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
-----------------------------------------------------------
Re: color buttons [message #7915 is a reply to message #7913] Sat, 25 January 1997 00:00 Go to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <5cbqde$ppq@larry.cc.emory.edu>, dwu@larry.cc.emory.edu (Ding Wu) 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).

In IDL on X windows systems you can use X "resources" to control the
color of IDL buttons.

____________________________________________________________
Mark Rivers (773) 702-2279 (office)
CARS (773) 702-9951 (secretary)
Univ. of Chicago (773) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars.uchicago.edu (e-mail)

or:
Argonne National Laboratory (630) 252-0422 (office)
Building 434A (630) 252-0405 (lab)
9700 South Cass Avenue (630) 252-1713 (beamline)
Argonne, IL 60439 (630) 252-0443 (FAX)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Interrupting widget applications
Next Topic: IDL and PV-Wave

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

Current Time: Wed Oct 08 13:42:39 PDT 2025

Total time taken to generate the page: 0.00568 seconds