
Mersenne
New User
Mar 25, 2009, 10:29 AM
Post #1 of 2
(1287 views)
|
[Tk] No selection with tagAdd
|
Can't Post
|
|
Hello ! I use Windows XP. I downloaded ActivePerl and Tk yesterday. It seems that in the following program, tagAdd has no effect :
use Tk; use strict; use utf8; use warnings; my $mw = MainWindow->new; my $hauteurEcran = $mw->screenheight(); my $largeurEcran = $mw->screenwidth(); $mw->configure( -width => $largeurEcran, -height => $hauteurEcran, ); $mw->title("Test sélection"); $mw->geometry(sprintf("%d",$largeurEcran) . "x" . sprintf("%d", $hauteurEcran) . "+0+0"); $mw->raise(); my $zoneTexte = $mw->Scrolled('Text', -scrollbars => 'se', -wrap => 'word', )->place( -anchor => 'nw', -width => $largeurEcran, -relheight => 0.95, -relx => 0.0, -rely => 0.05, ); $zoneTexte->insert('end', "abc"); $zoneTexte->tagAdd('sel', '1.0', 'end'); MainLoop; Does anybody have an explanation ? Thanks.
(This post was edited by Mersenne on Mar 25, 2009, 10:31 AM)
|