Andreas44 has asked for the wisdom of the Perl Monks concerning the following question:
use strict; use Win32::GUI(); $| = 1; sub MAIN{ my $main = Win32::GUI::Window->new(-width => 840, -height => 480, +-text => 'Main', -name => 'Main'); $main->AddButton(-width => 130, -height => 60, -text => 'Sub', -po +s => [100,100], -name => 'Sub'); $main->AddButton(-width => 66, -height => 24, -text => 'Exit', -po +s => [750,410], -name => 'Exit'); $main->Show(); Win32::GUI::Dialog(); sub Sub_Click { ADD(); } sub Exit_Click { $main->Hide(); system.exit(0); -1; } sub main_Terminate { $main->Hide(); system.exit(0); -1; } } sub ADD{ my $add = Win32::GUI::Window->new(-width => 840, -height => 480, - +text => 'Add', -name => 'add'); $add->Show(); $add->AddTextfield(-text => 'Input', -width => 360, -height => 130 +, -pos => [100,100], -name => 'input'); $add->AddButton(-width => 130, -height => 60, -text => 'Submit', - +pos => [100,300], -name => 'Submit'); $add->AddButton(-width => 66, -height => 24, -text => "Back", -pos + => [750,410], -name => 'Back2'); Win32::GUI::Dialog(); sub Submit_Click { print $add->input->Text(); $add->Hide(); MAIN(); return 0; } sub Back2_Click { $add->Hide(); MAIN(); -1; } sub add_Terminate{ $add->Hide(); MAIN(); -1; } } MAIN();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32 GUI - Problem with text input field
by Anonymous Monk on Jun 15, 2014 at 23:11 UTC | |
by dasgar (Priest) on Oct 15, 2014 at 06:44 UTC | |
by Anonymous Monk on Oct 16, 2014 at 21:40 UTC | |
by Andreas44 (Initiate) on Jun 17, 2014 at 18:00 UTC |