Re: Scrolling a window

[email protected] (Jeff Hobbs)
Newsgroups perl.tcltk
Message-ID <[email protected]>
On 2010-03-03, at 1:24 PM, Swingle David-QWHM86 wrote:
>> 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
>> 
> 
> Ok, that works, almost.  Thanks!  What I would really like is for the
> window to have no scrollbars when it is initially created.  Only if I
> shrink the window would I want the scrollbars.  Is there a way to do
> that?

Pass -managed => 0 option to ScrolledWindow.

> I've never seen Tkx::update('idletasks'), where in the documentation
> would I find that?

In the general Tk docs.

> Is there a difference between Tkx::winfo_reqwidth($subf) and
> Tkx::winfo('reqwidth', $subf)?  They both seem to work, is this just
> "there's more than one way to do it"?

Yes, you can see some of this discussed in the perldoc of Tcl or Tkx.

Jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.