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

Home » Public Forums » archive » Re: color of button
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 of button [message #18471] Fri, 07 January 2000 00:00
cjengo is currently offline  cjengo
Messages: 28
Registered: June 1999
Junior Member
In article <38734608.1EE8EABA@va.aetc.com>,
bpuc@va.aetc.com wrote:
>
> As far as I know, if you are working on a system which uses X windows
> (unix) you can use the keyword resource_name when defining the
widget.
> The help file gives an example of changing the color of a button this
> way. I'm not sure if this will allow you to change the color once the
> button is pressed, however.
>
> --
> Bernard Puc AETC, INC.

> bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
> (703) 413-0500 Arlington, VA 22202
>

Hope you guys don't mind, but I have a slightly different question
about implementing widget colors. I never knew this capability
existed, so I figured it would be great to use for some GUIs I wrote
that have lots and lots of drop-lists and cw-fields, but only a handful
of which the user needs to actively change or look at each time. I got
it to work fine for a simple test case with several buttons, but when I
apply it to my real code, I can only use major colors like red, green,
blue, etc (I'd like to use MistyRose, it's not so gaudy as the
others). Any ideas why?

Chris
--
_______________________________________
Chris Jengo - Senior Imaging Scientist
Earth Satellite Corp. - Rockville, MD
cjengo@earthsat.com


Sent via Deja.com http://www.deja.com/
Before you buy.
Re: color of button [message #18482 is a reply to message #18471] Thu, 06 January 2000 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Ian Dean (Ian.Dean@Gecm.com) writes:

> I've achieved a workaround for this using Motif X-windows under OpenVMS.
>
> This entailed creating two bases in the same position. Each of these bases
> contains an identical button, but with a different RESOURCE colour for its
> background. The event handler for the button then maps/unmaps the relevant
> bases to give the effect of changing button colour.

Years ago I wrote a "color button" widget that was really
a draw widget disguised as a button. (But it returned
button events, so it was just a drop-in replacement for
button widgets.) This would work so much better these
days with object graphics.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: color of button [message #18489 is a reply to message #18482] Thu, 06 January 2000 00:00 Go to previous message
Ian Dean is currently offline  Ian Dean
Messages: 26
Registered: January 2000
Junior Member
Hi,

I've achieved a workaround for this using Motif X-windows under OpenVMS.

This entailed creating two bases in the same position. Each of these bases
contains an identical button, but with a different RESOURCE colour for its
background. The event handler for the button then maps/unmaps the relevant
bases to give the effect of changing button colour.

I hope this can be of some use. I might be able to find a working copy id
you wish to e-mail me.

Regards,
Ian

Erik Hummel wrote:

> Hi,
>
> I like to have the functionality that a pressed button (Widget_Button)
> changes for instance color. There seems to be no option to change the
> color of a Widget. Is there a way?
>
> Thanks,
> Erik Hummel
>
> --
>
> -------------------------------------------------
> Erik Hummel dr. E. Hummel
> MR Image Handling Software
>
> email: erik.hummel@philips.com
> Phone: +31 40 2763318
> Fax: +31 40 2765644
>
> Philips Medical Systems
> Building QR1117, Veenpluis 6, 5684 PC Best
> The Netherlands
> ===================================================
Re: color of button [message #18508 is a reply to message #18482] Wed, 05 January 2000 00:00 Go to previous message
Bernard Puc is currently offline  Bernard Puc
Messages: 65
Registered: January 1998
Member
Erik Hummel wrote:
>
> Hi,
>
> I like to have the functionality that a pressed button (Widget_Button)
> changes for instance color. There seems to be no option to change the
> color of a Widget. Is there a way?
>

As far as I know, if you are working on a system which uses X windows
(unix) you can use the keyword resource_name when defining the widget.
The help file gives an example of changing the color of a button this
way. I'm not sure if this will allow you to change the color once the
button is pressed, however.

--
Bernard Puc AETC, INC.
bpuc@va.aetc.com 1225 Jefferson Davis Highway #800
(703) 413-0500 Arlington, VA 22202
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Make TV a function of X?
Next Topic: IDL.5.2.1

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

Current Time: Wed Oct 08 18:38:28 PDT 2025

Total time taken to generate the page: 0.00753 seconds