You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
455 B
Perl

use Tk;
$main = MainWindow->new();
$main->Scale('-orient'=> 'horizontal',
'-from' => 0,
'-to' => 200,
'-tickinterval' => 40,
'-label' => 'Select a value:',
'-length' => 200,
'-variable' => \$value,
'-command' => \&display
)->pack;
$text1 = $main->Text ('-width'=> 40,
'-height' => 2
)->pack;
sub display
{
$text1->delete('1.0','end');
$text1->insert('end', "$value");
}
MainLoop;