Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Keep It Simple, Stupid
 
PerlMonks  

Re: Tk::NoteBook tabs in a Tk::Dialog question

by buckaduck (Chaplain)
on Apr 23, 2002 at 16:27 UTC ( [id://161426]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Tk::NoteBook tabs in a Tk::Dialog question

I think that your code:
my $d = $dd->Frame()->pack(); my $n = $d->NoteBook()->pack( -expand => 0, -fill => 'x' );
should probably be something more like (untested):
my $d = $dd->add(Tk::Frame); $d->pack; my $n = $d->add(Tk::NoteBook); $n->pack( -expand => 0, -fill => 'x' );
The Tk widgets are not method names, you have to pass the widget names to the add() method. Also, I believe that you should assign the widget to a variable first and then pack() it.

buckaduck

Replies are listed 'Best First'.
Re^2: Tk::NoteBook tabs in a Tk::Dialog question
by HeatSeekerCannibal (Beadle) on Nov 10, 2006 at 17:28 UTC
    Buckaduck.... ....i dont know if its worth mentioning it, because his code doesnt have the same error, however it does have the same symptom as mine.... It CAN work like this:
    use Tk; use Tk::NoteBook; my $mw = MainWindow->new(-width => 40, -height => 50); $mw->title("Ventana Principal"); $mw->Label(-text => "Uso de pack")->pack; $FrameFon = $mw->Frame(-relief => 'raised')->pack(-side => 'bottom', f +ill => 'x', -expand => 1); $Libreta = $FrameFon->NoteBook(); $Libreta->pack(-side => 'top'); $Libreta->add("Pagina1", -label =>"Configuracion"); $Libreta->add("Pagina2", -label => "Logs"); MainLoop;
    ...but mine didnt work because i was writing Notebook instead of NoteBook.... :">
    Heatseeker Cannibal

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://161426]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.