in reply to Handling resizing in pTk

Hi TGI,

If you want wrapping done automatically for you, how about using a Text widget instead?:

my $textbox = $mw->Text( -wrap => 'word', )->pack( -fill => 'both', -expand => 1, ); $mw->after(100 => sub { initialize() }); MainLoop; sub initialize { $textbox->insert("1.0", $long_text); }

Then you can choose between the following types of wrap:

-wrap => 'none' .... Don't do any wrapping at all -wrap => 'char' .... Wrap between characters -wrap => 'word' .... Wrap between words

s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: Handling resizing in pTk
by TGI (Parson) on Oct 09, 2007 at 18:21 UTC

    Unfortunately, I'm stuck with a label, unless I want to dig in to a bunch of inherited code.

    In general, I aggree that a Text, or more specifically, an ROText would be pretty good for this sort of thing.


    TGI says moo