________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Daniel Burgaud Sent: Thursday, September 20, 2007 14:49 To: perl-win32-users@listserv.activestate.com Subject: PerlTk: problem with notebook and canvas Hi, Is it possible to create "Notebooks" of Canvas? use Tk; require Tk::BrowseEntry; require Tk::ROText; require Tk::NoteBook; my $mw = MainWindow->new( -bg => "#000000" ); $frames{main} = $mw->NoteBook(-relief=>'flat',-border=>1,-tabpadx=>1,-tabpady=>1,-font=> [-family=>"Tahoma",-size=>8],-bg=>'#404040',-foreground=>'#FFFFFF',-inac tivebackground=>"#808080")->pack(-expand => 1,-fill => 'both',-side => 'top'); foreach my $pair (qw/Pair1 Pair2 Pair3 Pair4 Pair5/) { $frames{tab}{$pair} = $frames{main}->add($pair, -label=>$pair); $frames{canvas}{$pair} = $frames{tab}{$pair}->Canvas( -width => 400, -height => 635, -background => 'black',)->pack(-side => 'top'); } $charts{$pair}{grid}{$price} = $frames{canvas}{$pair}->createLine(0,50,615,50, -fill => "#404040"); Compiles ok, but the last code keeps giving me this error: Can't call method "createLine" on an undefined value at chart.pl line 105. If I remove the "Notebook" codes the script runs ok. You state it runs okay, yet $price is never defined anywhere. I don't believe you are running with strict/warnings on because you would see uninitialized msgs coming along. Check that out first and then let the list know. Wags ;) What I wanted to do is create a TK, create notebooks and each of these "tabs" are canvases where I draw charts. thanks Dan
********************************************************************** This message contains information that is confidential and proprietary to FedEx Freight or its affiliates. It is intended only for the recipient named and for the express purpose(s) described therein. Any other use is prohibited. **********************************************************************
_______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs