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

Home » Public Forums » archive » Re: TLB Widget resizing
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: TLB Widget resizing [message #16792 is a reply to message #16790] Tue, 17 August 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Craig Markwardt (craigmnet@cow.physics.wisc.edu) writes:

> I have a different question however. There appear to be times when
> you can resize a window to *smaller* than it is supposed to be. That
> is, try to resize a window so that there is no way for all of the
> component widgets to fit.
>
> In that case, you do get a resize event which describes the size of
> the new, small window. For a moment on my Linux screen, the window
> does get smaller. However, IDL smartly decides that the component
> widgets can't fit inside, and the window "bounces" back to a larger
> size. It grows to a new size -- BUT a resize event is NEVER SENT.
>
> Who cares right? Well, I have a draw widget that is resized based on
> the (incorrect) numbers in the resize event. When the window
> "bounces" to a new size, the resulting draw widget looks pretty goofy.
> You can reproduce this in David Fanning (and my) XWINDOW program, and
> also with the following RESIZE program, based on work by Liam Gumley.
> Just run it, and resize the window to a very small width.
>
> Can anybody suggest a way to get a new resize event? I have
> considered requesting a timer event to periodically adjust the draw
> widget's dimensions.

Here is my unhelpful suggestion first: get a PC. Mr. Gates
has already thought about this situation and has determined
you will never be able to make this mistake, ever. :-)

Here is my (I hope) helpful suggestion: Put some minimum X and Y
base size values in your info structure. Refuse to allow anything
to size itself smaller than this minimum size. I'd have
code something like this:

PRO TEST_RESIZE, event
Widget_Control, event.top, Get_UValue=info, /No_Copy
Widget_Control, info.drawID, Draw_XSize=(event.x > info.minXsize), $
Draw_YSize=(event.y > info.minYsize)
Widget_Control, event.top, Set_UValue=info, /No_Copy
END

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155

[Note: This follow-up was e-mailed to the cited author.]
[Message index]
 
Read Message
Read Message
Previous Topic: seperators in menus
Next Topic: Re: IDL 5 Syntax ?

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

Current Time: Sat Oct 11 20:56:57 PDT 2025

Total time taken to generate the page: 1.51935 seconds