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',-inactivebackground=>"#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.

What I wanted to do is create a TK, create notebooks and each of these
"tabs" are canvases where I draw charts.

thanks
Dan
_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to