Just a simple TK login script - nothing fancy. Someone may find this useful = )

JSchmitz
#!/usr/bin/perl -w require Tk::LabEntry; require Tk::DialogBox; $mw = MainWindow->new(); $db = $mw->DialogBox(-title => 'Login', -buttons => ['Ok', 'Cancel'], -default_button => 'Ok'); $db->add('LabEntry', -textvariable => \$uname, -width => 20, -label => 'Username', -labelPack => [-side => 'left'])->pack; $db->add('LabEntry', -textvariable =>\$pw, -width => 20, -label => 'Password', -show => '*', -labelPack => [-side => 'left'])->pack; $answer = $db->Show(); if ($answer eq "Ok") { print "Username = $uname, Password = $pw\n"; }

Replies are listed 'Best First'.
Re: TK login box
by Anonymous Monk on Jul 07, 2002 at 20:49 UTC
    Do you really think displaying the password to the screen is a good idea?