Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Perl Tk Notebook not filling main window height

by Discipulus (Canon)
on May 24, 2017 at 11:37 UTC ( [id://1191073]=note: print w/replies, xml ) Need Help??


in reply to Perl Tk Notebook not filling main window height

hello,

your question seems very similar to Re^2: why is the size of notebooks area smaller than main window (Tk).. normally is preferable to continue the old thread instead of creating a new one..

Anyway.. even if i have not a solution I have some suggestion: first our is not appropriate in the example: my is better.

You also repack two times the same widget, creating a bit of confusion; also the withdraw / Popup is avoidable.

Then a smaller example will be better to play with. You can add Tk::WidgetDump to see how each part of your Tk program is configured, I find it very useful.

In my smaller example seems that anything i do the Tk::NotePad object has a limited size with or without -fill => 'both', -expand => 1

Can be this related to the fact (in the docs) that: The options -width and -height do not work. ?

#!/usr/bin/perl # THIS DOES NOT RESOLVE YOR ISSUE, but is simpler to play with use warnings; use strict; use Tk; use Tk::NoteBook; use Tk::Pane; my $mw = MainWindow->new; $mw->packPropagate(0);#->geometry('300x200'); my $frame = $mw->Scrolled( 'Frame',-background=>'purple', -scrollbars +=> "s") ->pack(-expand=>1, -fill=>'both', -anchor=>' +nw'); my $nb_widget = $frame->NoteBook->pack(-expand=>1, -fill=>'both'); for (1..20){ $nb_widget->add("page$_", -label=>"PAGE $_") ->Scrolled("Text", -scrollbars => "e", -wrap = +> 'none') ->pack(-expand => 1, -fill => 'both');; } MainLoop;

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^2: Perl Tk Notebook not filling main window height
by Anonymous Monk on May 24, 2017 at 13:19 UTC
    Of course our is appropriate

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1191073]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-24 00:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found