Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^2: GUI question: Prima: password input fields

by Anonymous Monk
on Dec 22, 2019 at 00:45 UTC ( [id://11110496]=note: print w/replies, xml ) Need Help??


in reply to Re: GUI question: Prima: password input fields
in thread GUI question: Prima: password input fields

So modifying https://metacpan.org/source/KARASIK/Prima-1.57/examples/menu.pl you can see a solution

bless({ __CMATE__ => 15985916, alignment => 1, atDrawX => 0, atDrawY => 0, autoHeight => 1, autoSelect => 1, autoTab => 0, borderWidth => 1, charOffset => 3, defcw => 1, firstChar => 0, font_height => 13, font_width => 5, grouped_undo => 2, insertMode => 1, line => ("*" x 31), lineWidth => 124, maxLen => 200, passwordChar => "*", readOnly => 0, redo => [], resetDisabled => 0, resetLevel => 0, selChunks => [], selEnd => 0, selStart => 0, textDirection => 0, undo => [ [["selection", 0, 0], ["selection", 0, 0], ["s +election", 0, 0]], [["charOffset", 0]], [["firstChar", 0], ["selection", 0, 0]], [ ["selection", 0, 0], ["edit_text", "Menu and input line example"] +, ["selection", 0, 0], ["charOffset", 1], ], [ ["selection", 0, 0], ["edit_text", "aMenu and input line example" +], ["selection", 0, 0], ["charOffset", 2], ], [ ["selection", 0, 0], ["edit_text", "asMenu and input line example +"], ["selection", 0, 0], ["charOffset", 3], ], [ ["selection", 0, 0], ["edit_text", "asdMenu and input line exampl +e"], ["selection", 0, 0], ], ], undoLimit => 10, wholeLine => ("*" x 31), wordDelimiters => ".()\"',#!%^&*{}[]?/|;:<>-= \xFF\t", writeOnly => 1, }, "Prima::InputLine"),
$w-> insert( "InputLine", pack => { pady => 20, padx => 20, fill => 'x', side => 'botto +m'}, text => $w-> text, maxLen => 200, onChange => sub { #~ warn "@_"; #~ use Data::Dump;dd(\@_); #~ use Data::Dump;dd( $inputine->{undo}->[-1][1][1] ); use Data::Dump;dd( $_[0]->{undo}[-1][1][1] , $_[0]->text ); $_[0]-> owner-> text( $_[0]-> text); $_[0]-> owner-> Label1-> text( $_[0]-> text); $_[0]-> owner-> menu-> coexistentor-> text( $_[0]-> text) if $_[0]-> owner-> menu-> has_item( 'coexistentor'); }, );
$inputline->password; sub Prima::InputLine::password { my( $inputline ) = @_; local $@; return "".eval { $inputine->{undo}->[-1][1][1] }; }

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-26 05:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found