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

Home » Public Forums » archive » Keeping Button Pressed In?
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: Keeping Button Pressed In? [message #45951 is a reply to message #45278] Mon, 24 October 2005 10:41 Go to previous messageGo to previous message
JD Smith is currently offline  JD Smith
Messages: 850
Registered: December 1999
Senior Member
On Mon, 24 Oct 2005 17:08:43 +0000, Dick Jackson wrote:

> Hi again,
>
> I've improved this routine a bit, it should be even more useful now!
>
> "Dick Jackson" <dick@d-jackson.com> wrote in message
> news:tAZ6f.274433$oW2.56864@pd7tw1no...
>> Hi Benjamin:
>>
>> "Benjamin Hornberger" <benjamin.hornberger@stonybrook.edu> wrote in
>> message news:43592bf7$1_1@marge.ic.sunysb.edu...
>>>
>>> Interesting. I find it inconsistent though that bitmap buttons behave
>>> like that, while buttons with a text value (label) turn into radio
>>> buttons in an exclusive base. What if I want a "depressed" button with a
>>> text value?
>>>
>>> Benjamin
>>
>> I've found this to work pretty well, a function that takes the text value
>> as a string and converts it to the RGB byte array for your Widget_Button.
>> I realize it's not perfect about aligning one button with no descenders
>> (e.g., 'GJPY') and another with descenders (e.g., 'gjpy'), but I don't
>> have time to make that very doable fix right now.
>
> That is now fixed, and I'd like to hear how the result looks on a Unix
> system. Comments are welcome!


I think you need to temporarily turn on decomposed color to get the
button background color correct. The bummer of Motif is that you
can't get depressed buttons in Exclusive/Non-exclusive bases, so this
routine helps us little. Instead, you always get a little diamond
next to the button, be it text or bitmap, to indicate selection
status. I've worked around this by simulating my own exclusivity and
changing the button value bitmap to look different when selected.
It's not ideal. I'm not sure if this is a Motif limitation or an IDL
limitation (buttons *do* depress when you click them).

JD
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: random integers between 0 and 1,000,000
Next Topic: Reading UUID from JPEG2000 file

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

Current Time: Fri Oct 10 14:18:48 PDT 2025

Total time taken to generate the page: 0.80103 seconds