Re: (non)exclusive buttons in menu bars [message #9788] |
Fri, 22 August 1997 00:00 |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
Alex Schuster wrote:
> Right here, in Netscape's composing window, there are buttons in the
> menu bar which work as nonexclusive buttons: I can set options directly
> by selecting the button.
> AFAIK that's not directly possible in IDL (why??), but maybe someone
> already wrote some routines for that?
> A workaround should be possible. I'm thinking of a modified version of
> WIDGET_BUTTON. Maybe the button text should be given via a TITLE
> keyword, and the state (on/off) via the VALUE keyword. Somehow this
> state should be shown in the title, by adding (On) / (Off) or s.th. like
> that. When it is selected, let an event handler toggle this state and
> update the title. FUNC_GET_VALUE and PRO_SET_VALUE make setting the
> states transparent.
Alex,
I take it you mean the bitmap buttons which control the text formatting (I'm
typing this in the Netscape composition window). I think it would be
possible to implement something like this in IDL if you used buttons with
bitmap labels. You could have the button with a black graphic on a white
background, and then when you detect a mouse button release event on that
button, you could set a button flag, and then change the bitmap label to
reverse video.
I think a graphic button label is better than labeling button "On' or "Off'.
I designed some widgets a while ago which had On/Off labels that toggled
when you selected the button, and users said they were never sure if "On"
meant "It's On Now - Turn it Off", or "It's Off Now - Turn it On".
Cheers,
Liam.
|
|
|