Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

quick Tk question

by Grygonos (Chaplain)
on Dec 05, 2003 at 19:37 UTC ( [id://312604]=perlquestion: print w/replies, xml ) Need Help??

Grygonos has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way to * out selected text in Tk. Say an FTP password. I was just toying around with Net::FTP and Tk making a FTP client.

Thanks,

Grygonos

Replies are listed 'Best First'.
Re: quick Tk question
by CombatSquirrel (Hermit) on Dec 05, 2003 at 21:01 UTC
    I'm not quite sure about what you mean, but you might be looking for the -show attribute of Tk::Entry. Example:
    #!perl -w use strict; use Tk; my $main = new MainWindow; my $entry = $main->Entry(-show => '*')->pack; MainLoop;

    Hope this helped.
    CombatSquirrel.
    Entropy is the tendency of everything going to hell.
Re: quick Tk question
by converter (Priest) on Dec 05, 2003 at 21:04 UTC

    See the -show option in the Tk::Entry man page. Example:

    #!/usr/bin/perl use warnings; use strict; use Tk; my $input = ''; my $m = tkinit; $m->Entry( -show => "*", -textvariable => \$input, )->pack; $m->Button( -text => 'Quit', -command => sub { $m->destroy }, )->pack; MainLoop; print "input was: $input\n";

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://312604]
Approved by spacewarp
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (4)
As of 2024-04-24 05:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found