On Wed, 11 Sep 2002 12:41:25 -0400, [EMAIL PROTECTED] (Jess Balint)
wrote:

>Hey all. Does anyone know how to create a password style text widget in tk?
>I have tried a few things, but can't seem to figure it out. Thanks.

I'm not an expert on Tk , but try this to get you going:
################################################
#!/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";

}






-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to