
samir_gambler
New User
May 3, 2013, 4:32 AM
Post #1 of 2
(21112 views)
|
Reseting textfield text
|
Can't Post
|
|
Hello, I am new to Perl GUI. I am trying to make a window with option to enter login ID and Password. I want to add a button to reset the textfield entry. I am unable to reset the text box entry. please have a look into the code
use warnings; use Win32::GUI(); my $MainWindow = Win32::GUI::Window->new( -text => 'Main', -name => 'MainWindow', -pos => [ 10, 10 ], -size => [ 900, 900 ], ); my $loginIDLabel = $MainWindow->AddLabel( -text => "User ID:", -pos => [ 10, 10 ], ); my $loginPassLabel = $MainWindow->AddLabel( -text => "Password:", -pos => [ 10, 40 ], ); my $loginIDTextFields = $MainWindow->AddTextfield( -name => "LoginID", -width => 150, -height => 20, -pos => [60,8], ); my $loginPassTextField = $MainWindow->AddTextfield( -name => "LoginPass", -width => 150, -height => 20, -pos => [60,38], -password => 1, ); my $loginSave = $MainWindow->AddButton( -name => "Save", -text => "Save", -pos => [ 50, 80 ], ); my $loginReset = $MainWindow->AddButton( -name => "Reset", -text => "Reset", -pos => [ 100, 80 ], ); $MainWindow->Show(); Win32::GUI::Dialog(); sub Reset_Click { #wish to reset the textfield content return 0; }; sub Save_Click { #wish to call a subroutine return -1; }; thanks....
|