Re: Scrolling a window
[email protected] (Jeff Hobbs)
| Newsgroups | perl.tcltk |
|---|---|
| Message-ID | <[email protected]> |
On 03/03/2010 10:09 AM, Swingle David-QWHM86 wrote:
>> winfo reqwidth/height on the frame once populated and after an update
> idletasks may give you the right size.> Make sure you check for
> reasonable maximums though.
>
> I don't understand how to use reqwidth and reqheight. They return the
> 'requested' width and height, which seems to always be 396, 282 for a
> window. Can you explain how it would work? Here's sample code that
> tries using reqwidth/reqheight and also width/height. Width/height
> simply returns the current size, which if the window is stretched or
> shrunk will be different from 396, 282.
You aren't asking the right widgets for the info. Simply add this
before the MainLoop:
Tkx::update('idletasks');
Tkx::wm_geometry($mw, Tkx::winfo_reqwidth($subf) . "x" .
Tkx::winfo_reqheight($subf));
Jeff