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 #16790] Tue, 17 August 1999 00:00 Go to previous message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
davidf@dfanning.com (David Fanning) writes:
> 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

Right. I might have been chasing my tail more than I needed to.
Something interesting did come up in my trevails however.

I think I have found another work-around for the dreaded expanding
widget bug. [ As a summary, the bug is that resizable widgets will
grow an *extra* amount every time their size is adjusted. ]

Make sure your top-level base has XPAD=0 and YPAD=0 upon
initialization. That removes any margin spacing in the top level
base, and seems to solve at least part of the expanding widget
problem. If you do need margin spacing, then you can encapsulate
everything in another base widget, using the default XPAD and YPAD.

Example code:
tlb0 = widget_base( title='Resize Example', $
tlb_size_events=1, column=1, xpad=0, ypad=0 )
tlb = widget_base(tlb0, column=1)

Now, put everything in tlb instead of tlb0.

Unfortunately this doesn't solve the problem of widget windows with
menus. Apparently menus are also considered to be padding.

Craig

[ copy to David Fanning ]
--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
[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 14:44:16 PDT 2025

Total time taken to generate the page: 1.05245 seconds