Re: controlling dialog widget size [message #30472] |
Wed, 01 May 2002 12:15  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Virginia Rogers (vrogers@umich.edu) writes:
> Is there a way to ensure that my modal dialog widget will fit on any display
> screen? I have a modal dialog which is arranged in a column. On most displays,
> the whole widget fits on the screen. But on some smaller displays, the widget
> is too tall to fit on the screen, and thus, the "OK" button at the bottom of the
> widget cannot be selected.
>
> I realize that I could arrange the widget into two columns so that it is shorter
> and wider. But what I'm really interested in is a general way of ensuring that
> a dialog will fit on any screen. Should I check the screen size and check the
> size of the top level base and rearange the dialog if necessary?
Yes, you could do this. Check the TLB geometry to see what size
it is before it is realized, if it's too big, reorganize, etc.
It's a pain in the neck, and you inevitably end up throwing in
a "fudge factor" of 11, or 17, or 33, or whatever it happens to
be that day on that machine. It will have to be something else
on the machine of whoever you give the code to.
Better to have a quick peak at the screen size and if it
is below a certain threshold say, the heck with it, two
columns for you, big guy.
> Can you add a scroll bar to a dialog?
Yes. But that doesn't guarantee your user is going
to find your OK button. Users can be pretty dense. :-(
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: controlling dialog widget size [message #30473 is a reply to message #30472] |
Wed, 01 May 2002 10:48   |
James Kuyper
Messages: 425 Registered: March 2000
|
Senior Member |
|
|
Virginia Rogers wrote:
> Hello,
>
> Is there a way to ensure that my modal dialog widget will fit on any display
> screen? I have a modal dialog which is arranged in a column. On most displays,
> the whole widget fits on the screen. But on some smaller displays, the widget
> is too tall to fit on the screen, and thus, the "OK" button at the bottom of the
> widget cannot be selected.
>
> I realize that I could arrange the widget into two columns so that it is shorter
> and wider. But what I'm really interested in is a general way of ensuring that
> a dialog will fit on any screen. Should I check the screen size and check the
> size of the top level base and rearange the dialog if necessary? ...
Yes, that will work, but it's pretty complicated to do it right.
> Can you add a
> scroll bar to a dialog?
Yes, that's simpler and more general. Just create the TLB with the
SCROLL keyword.
> Any other ideas?
Another possibility is to split your dialog into multiple smaller
dialogs. If you're filling the screen with a single dialog, it may be
too complicated.
|
|
|
Re: controlling dialog widget size [message #30569 is a reply to message #30473] |
Wed, 01 May 2002 13:29  |
Virginia Rogers
Messages: 4 Registered: July 2000
|
Junior Member |
|
|
James, Thanks for the advice. I didn't realize the base widget had a scroll bar
option. However, I just looked up the documentation, and I guess the /scroll
and /modal flags don't work together!
James Kuyper wrote:
>
Should I check the screen size and check the
>> size of the top level base and rearange the dialog if necessary? ...
>
> Yes, that will work, but it's pretty complicated to do it right.
>
>> Can you add a
>> scroll bar to a dialog?
>
> Yes, that's simpler and more general. Just create the TLB with the
> SCROLL keyword.
>
>> Any other ideas?
>
> Another possibility is to split your dialog into multiple smaller
> dialogs. If you're filling the screen with a single dialog, it may be
> too complicated.
|
|
|