1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
use Tk;
use strict;
use warnings;
my $mw = MainWindow->new;
my $hauteurEcran = $mw->screenheight();
my $largeurEcran = $mw->screenwidth();
$mw->configure(
-width => $largeurEcran,
-height => $hauteurEcran,
);
$mw->title("Test selection");
$mw->geometry(sprintf("%d",$largeurEcran) . "x" . sprintf("%d", $hauteurEcran) . "+0+0");
$mw->raise();
my $zoneTexte = $mw->Scrolled('Text',
-scrollbars => 'se',
-wrap => 'word',
-exportselection => 0,
)->place(
-anchor => 'nw',
-width => $largeurEcran,
-relheight => 0.95,
-relx => 0.0,
-rely => 0.05,
);
$zoneTexte->insert('end', "abc");
$zoneTexte->tagAdd('sel', '1.0', 'end');
$zoneTexte->focus;
$zoneTexte->messageBox(-title => 'Test Selection',
-message => "Do you see the selection ?",
-type => 'OK',
);
MainLoop; |
Partager