in reply to Re: win32::GUI help
in thread win32::GUI help [solved]
And changed MenuButton1_About to:sub MessageBox{ my $MessageBox_About = new Win32::GUI::Window( -name => "AboutWindow", -title => "About this program", -pos =>[ 150, 150 ], -size => [150,150], -parent => $Main, ); $MessageBox_About->AddLabel( -name => "MsgBox_Label", -text => "Blabla", -pos => [20,20], ); $MessageBox_About->AddButton( -name => "MsgBox_Button", -text => "Ok", -pos => [50,40], ); $MessageBox_About->DoModal(); return 0; }
The about messagebox does appear now (A window with label Blabla and an OK button) but right at the start of the program (without clicking on the about menuitem). After clicking on Ok or terminating the window, the main window pops up. When clicking the about menuitem it gives the following error: Undefined subroutine &main::0 called at xx.pl line 127 (even though the program only has 118 lines).my $MenuButton1_About = $MenuButton1->AddMenuItem( -text => "About", -id => $Menu_id++, -onClick => MessageBox(), );
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: win32::GUI help
by thomaster (Initiate) on Oct 15, 2014 at 16:31 UTC |