Re: Some more tricky questions........ [message #14124 is a reply to message #14122] |
Wed, 20 January 1999 00:00  |
J.D. Smith
Messages: 214 Registered: August 1996
|
Senior Member |
|
|
Phil Aldis wrote:
>
> Hi,
>
> Everything always goes wrong at once doesn't it. Here are some more
> things which I suspect can't be done.....
>
> 1. I'm trying to create a properties box and I thought it would be
> quite nice to have tabs, like windows properties boxes. If you look
> at the Windows display properties box, while I attempt to describe
> what I was thinking of doing then it might possibly make some sense.
> The best way I could think of doing this was to have a group of
> buttons which were by default all pressed but one was always up. Below
> the buttons I would map the relevant bases associated with each button
> or tab and with some careful placing it would look as if the buttons
> were tabs. I would then put tab looking bitmaps on the buttons.
> However I can't see any way of creating the opposite of an exclusive
> base, i.e. all of them are pressed except for one. Is there any way of
> making an exclusive button change its state from within a program.
>
You could easily just use a non-exclusive base populated with buttons
with code in the event handler to create this functionality. That is,
whenever a button is *un-selected*, set all others to selected via
widget_control,button,/set_button. If the current (and only) unselected
button is selected, simply disregard this event. This creates the
negative of an exclusive base.
I think this won't do what you wan't though, since you will get radio
buttons or checkboxes, *not* the normal "text-within-the-button" button,
which look more like the tabs of a pane.
You could also of course use 2 bitmaps for each button... a selected and
an un-selected bitmap, toggling as necessary. I've always just used a
normal exclusive base for this purpose. Usually attempts to expand
IDL's widget toolkit by trickery will yield disappointing results.
Good Luck,
JD
--
J.D. Smith |*| WORK: (607) 255-5842
Cornell University Dept. of Astronomy |*| (607) 255-6263
304 Space Sciences Bldg. |*| FAX: (607) 255-5875
Ithaca, NY 14853 |*|
|
|
|