Hi,
here is what Tk::Canvas doc says;
$canvas-gtpostscript(?option, value, option, value, ...?)
here is what I have;
use strict;
use Tk;
use Tk::Menubutton;
use Tk::Canvas;
my $wow = MainWindow->new;
$wow->title("Printing"
my $wocanvas = $wow->Canvas(-width=>200,-height=>110,
-background=>"white"->pack(
-side=>"top",-anchor=>"n"
my $lowcanvas = $wocanvas->createText(100,20,
-text=>"Here is an example of what\nthe form should look like.",-tags=>"note"
$lowcanvas = $wocanvas->createText(85,60,
-text=>"\nTitle Colors\n Blue\n Green\n Red",
-tags=>"note"
my $rect1 = $wocanvas->createRectangle(80,50,150,35,-tags=>'note');
my $rect2 = $wocanvas->createRectangle(80,68,150,53,-tags=>"note"
my $rect3 = $wocanvas->createRectangle(80,83,150,70,-tags=>"note"
my $rect4 = $wocanvas->createRectangle(80,100,150,85,-tags=>"note"
$wow->Button(-text=>'Clear Work Order',-command=>sub {@wodata=(); $wow->destroy()},
-width=>17)->pack(-anchor=>'center');
$wow->Button(-text=>'Print Work Order',-command=>sub {$lowcanvas->postscript();},
-width=>17)->pack;
}
the button's -command should print the canvas????
I get this error;
Tk::Error: Can't call method "postscript" without a package or object reference
help pls
thanks
paul
here is what Tk::Canvas doc says;
$canvas-gtpostscript(?option, value, option, value, ...?)
here is what I have;
use strict;
use Tk;
use Tk::Menubutton;
use Tk::Canvas;
my $wow = MainWindow->new;
$wow->title("Printing"
my $wocanvas = $wow->Canvas(-width=>200,-height=>110,
-background=>"white"->pack(
-side=>"top",-anchor=>"n"
my $lowcanvas = $wocanvas->createText(100,20,
-text=>"Here is an example of what\nthe form should look like.",-tags=>"note"
$lowcanvas = $wocanvas->createText(85,60,
-text=>"\nTitle Colors\n Blue\n Green\n Red",
-tags=>"note"
my $rect1 = $wocanvas->createRectangle(80,50,150,35,-tags=>'note');
my $rect2 = $wocanvas->createRectangle(80,68,150,53,-tags=>"note"
my $rect3 = $wocanvas->createRectangle(80,83,150,70,-tags=>"note"
my $rect4 = $wocanvas->createRectangle(80,100,150,85,-tags=>"note"
$wow->Button(-text=>'Clear Work Order',-command=>sub {@wodata=(); $wow->destroy()},
-width=>17)->pack(-anchor=>'center');
$wow->Button(-text=>'Print Work Order',-command=>sub {$lowcanvas->postscript();},
-width=>17)->pack;
}
the button's -command should print the canvas????
I get this error;
Tk::Error: Can't call method "postscript" without a package or object reference
help pls
thanks
paul