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

Home » Public Forums » archive » Re: Buttons in Widgets
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Buttons in Widgets [message #80562 is a reply to message #80560] Mon, 25 June 2012 05:36 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Helder writes:

> I'm don't like that much how the buttons of IDL widgets
> look (Widget_button) even when using the /bitmap argument.
> I am exploring the solution of using a draw_widget, making
> it of the same color as the background(*) and then filling
> it is with my own drawing. The difference between the two
> methods is that the borders of the buttons will appear
> different: for a button widget these are defined by the
> IDL and for a draw widget one can have "no" borders or
> define how these look like. Another advantage is that
> one can have the effect of having an something like
> an icon floating on a background.
> Has anybody tried doing such things?

Of course. :-)

To be "real" for users (i.e., they get the idea they have
"pushed" something) you need to have two states for your
button: a "normal" look and a "pushed" look. Depending
on how you draw your button, this sometimes is just a
matter of reversing some or all of your colors (you need
about 6-10 to make a decent looking button). You definitely
want to build this as a compound object-widget, because
there is going to be a lot of things your button will
want to remember.

In the end, I think you will find that it is probably
just a whole lot easier and more efficient to change
your attitude about WIDGET_BUTTON and use it. :-)

> (*) Is there a way to find out what color the base
> widget has and/or to define it?

Use the System_Colors keyword to Widget_Info to get
this information. I carried this information around in
cgColor for years, but no one I knew (including me
after I gave up on making my own buttons) ever
used it, so I removed it. It requires a window
connection to obtain these colors, so don't distribute
your application widely, unless you wish additional
headaches. :-)

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: GPULIB troubleshoot
Next Topic: Coyote graphics resizeable window

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

Current Time: Thu Oct 09 07:23:15 PDT 2025

Total time taken to generate the page: 1.03872 seconds