in reply to Numeric entry Tk widget with up/down buttons, does it exist?
Here is a basic Spinbox example.
I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Spinbox; #see also JComboBox my $mw = MainWindow->new; $mw->title("Spinner"); $mw->fontCreate('big', -family=>'courier', -weight=>'bold', -size=> 24); my $sp1 = $mw->Spinbox(-width => 2, -font => 'big', -command => sub{ &show_set }, -value => [0..23])->pack (-side=>'left'); $mw->Label(-text=>":")->pack (-side=>'left'); my $sp2 = $mw->Spinbox(-width => 2, -font => 'big', -command => sub{ &show_set }, -value => [0..59])->pack (-side=>'left'); MainLoop; ########################### sub show_set{ print "@_\n"; }
I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Numeric entry Tk widget with up/down buttons, does it exist?
by perltux (Monk) on Nov 19, 2012 at 09:55 UTC |
In Section
Seekers of Perl Wisdom