traveler has asked for the wisdom of the Perl Monks concerning the following question:
Thanks! --traveler#! /usr/bin/perl -w use strict; use Tk; my $mw = MainWindow->new(-title => "Try to put a line over an image" ) +; $mw -> Photo ('imggif', -file => 'C:/foo.gif'); my $cf = $mw->Frame; $cf->pack( -side => 'left', -fill => 'y', -expand => 1); my $label = $cf->Label( -image => 'imggif'); # $label->pack( -side => 'left', -fill => 'both', -expand => 1); $label->place( -anchor => 'nw', -relheight => 1, -relwidth => 1, -x => 0, -y => 0); my $c = $cf->Scrolled("Canvas", -cursor => 'crosshair', # was $mw-> -scrollbars => 'se') ->pack( -side => 'left', -fill => 'both', -expand => 1); my $line = $c->createLine(0,0,100,100, -width => 2, -fill => "red"); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Transparent draw with tk
by Daruma (Curate) on Nov 07, 2002 at 00:30 UTC | |
by traveler (Parson) on Nov 07, 2002 at 17:24 UTC |