in reply to show/hide an Entry field
#!/usr/bin/perl # http://perlmonks.org/?node_id=1166828 use strict; use warnings; use Tk; my $alt = 0; my $mw = new MainWindow; my $e = $mw->Entry(-show => '*', )->pack(); $mw->Button(-text => 'Toggle', -command => sub { $e->configure( -show => $alt++ % 2 ? '*' : '' ) }, )->pack(); MainLoop;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: show/hide an Entry field
by dadenn (Initiate) on Jun 29, 2016 at 23:14 UTC | |
by Anonymous Monk on Jun 29, 2016 at 23:25 UTC | |
by Anonymous Monk on Jun 29, 2016 at 23:21 UTC |