From: Maxmelbin N. (RBIN/EMT1) <Max...@in...> - 2007-07-06 12:14:35
|
Hello , I have a button CANCEL which should close the window .. How to do it ? What is the method=20 My code .. use Win32::GUI; use Win32::GUI::GridLayout; $main =3D Win32::GUI::DialogBox->new(-name =3D> 'Main', -text =3D> 'Perl Win32 GUI', -width =3D> 550, -height =3D> 650, -maximizebox =3D> 0, $main->AddButton( -name =3D> "cancel", -width=3D>110, -height=3D>27, -left =3D> 360, -top =3D>580, -text=3D>"CANCEL", ); $main->Show(); Win32::GUI::Dialog(); sub Main_Terminate { -1; } sub cancel_Click { ????? } Thanks and Regards Maxmelbin Neson ------------------------------------------------------------------------ ----------------------------------------- Robert Bosch India Limited Engineering Services - DS - Methods and Tools (RBIN/EMT1) 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 max...@in... www.bosch.com |
From: Geoffrey S. <geo...@gm...> - 2007-07-06 12:28:14
|
Maxmelbin, You simply need to return -1, the same as in your Main_Terminate function. On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> wrote: > > > > > Hello , > > I have a button CANCEL which should close the window .. How to do it ? What > is the method > My code .. > > use Win32::GUI; > use Win32::GUI::GridLayout; > > $main = Win32::GUI::DialogBox->new(-name => 'Main', > -text => 'Perl Win32 GUI', > -width => 550, > -height => 650, > -maximizebox => 0, > $main->AddButton( > -name => "cancel", > -width=>110, > -height=>27, > -left => 360, > -top =>580, > -text=>"CANCEL", > ); > > $main->Show(); > Win32::GUI::Dialog(); > > sub Main_Terminate { > -1; > } > > sub cancel_Click { > ????? > } > > > Thanks and Regards > Maxmelbin Neson > ----------------------------------------------------------------------------------------------------------------- > Robert Bosch India Limited > Engineering Services - DS - Methods and Tools (RBIN/EMT1) > 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA > Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 > max...@in... > www.bosch.com > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > -- Geoffrey Spear http://www.geoffreyspear.com/ |
From: Maxmelbin N. (RBIN/EMT1) <Max...@in...> - 2007-07-06 12:36:50
|
Hello Geoffrey , Thanks a lot for the help .. Today is my first day with Win32::Gui .. So a lot of questions .. Now I want to display an error message in a message box. Is a message box already present in WIN32::GUI or should I create another window to display the error with OK and Cancel prompt.=20 Thanks and Regards Maxmelbin Neson -----Original Message----- From: Geoffrey Spear [mailto:geo...@gm...]=20 Sent: Friday, 6. July 2007 5:58 PM To: Maxmelbin Neson (RBIN/EMT1) Cc: per...@li... Subject: Re: [perl-win32-gui-users] How to terminate a window in Win32:GUI Maxmelbin, You simply need to return -1, the same as in your Main_Terminate function. On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> wrote: > > > > > Hello , > > I have a button CANCEL which should close the window .. How to do it ? What > is the method > My code .. > > use Win32::GUI; > use Win32::GUI::GridLayout; > > $main =3D Win32::GUI::DialogBox->new(-name =3D> 'Main', > -text =3D> 'Perl Win32 GUI', > -width =3D> 550, > -height =3D> 650, > -maximizebox =3D> 0, > $main->AddButton( > -name =3D> "cancel", > -width=3D>110, > -height=3D>27, > -left =3D> 360, > -top =3D>580, > -text=3D>"CANCEL", > ); > > $main->Show(); > Win32::GUI::Dialog(); > > sub Main_Terminate { > -1; > } > > sub cancel_Click { > ????? > } > > > Thanks and Regards > Maxmelbin Neson > ------------------------------------------------------------------------ ----------------------------------------- > Robert Bosch India Limited > Engineering Services - DS - Methods and Tools (RBIN/EMT1) > 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA > Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 > max...@in... > www.bosch.com > > ------------------------------------------------------------------------ - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Per...@li... > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > http://perl-win32-gui.sourceforge.net/ > --=20 Geoffrey Spear http://www.geoffreyspear.com/ |
From: Geoffrey S. <geo...@gm...> - 2007-07-06 12:49:57
|
For that you want Win32::GUI::MessageBox(). You can find all of the available options at http://perl-win32-gui.sourceforge.net/cgi-bin/docs.cgi?doc=reference-methods On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> wrote: > > Hello Geoffrey , > > Thanks a lot for the help .. > Today is my first day with Win32::Gui .. So a lot of questions .. > > Now I want to display an error message in a message box. > Is a message box already present in WIN32::GUI or should I create > another window to display the error with OK and Cancel prompt. > > > Thanks and Regards > Maxmelbin Neson > > > -----Original Message----- > From: Geoffrey Spear [mailto:geo...@gm...] > Sent: Friday, 6. July 2007 5:58 PM > To: Maxmelbin Neson (RBIN/EMT1) > Cc: per...@li... > Subject: Re: [perl-win32-gui-users] How to terminate a window in > Win32:GUI > > Maxmelbin, > > You simply need to return -1, the same as in your Main_Terminate > function. > > On 7/6/07, Maxmelbin Neson (RBIN/EMT1) <Max...@in...> > wrote: > > > > > > > > > > Hello , > > > > I have a button CANCEL which should close the window .. How to do it > ? What > > is the method > > My code .. > > > > use Win32::GUI; > > use Win32::GUI::GridLayout; > > > > $main = Win32::GUI::DialogBox->new(-name => 'Main', > > -text => 'Perl Win32 GUI', > > -width => 550, > > -height => 650, > > -maximizebox => 0, > > $main->AddButton( > > -name => "cancel", > > -width=>110, > > -height=>27, > > -left => 360, > > -top =>580, > > -text=>"CANCEL", > > ); > > > > $main->Show(); > > Win32::GUI::Dialog(); > > > > sub Main_Terminate { > > -1; > > } > > > > sub cancel_Click { > > ????? > > } > > > > > > Thanks and Regards > > Maxmelbin Neson > > > ------------------------------------------------------------------------ > ----------------------------------------- > > Robert Bosch India Limited > > Engineering Services - DS - Methods and Tools (RBIN/EMT1) > > 123 Industrial Layout - Hosur Road - Bangalore 560 095 - INDIA > > Telephone: +91 80 6657-4532 Fax: +91 80 6657-1404 > > max...@in... > > www.bosch.com > > > > > ------------------------------------------------------------------------ > - > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Perl-Win32-GUI-Users mailing list > > Per...@li... > > https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users > > http://perl-win32-gui.sourceforge.net/ > > > > > -- > Geoffrey Spear > http://www.geoffreyspear.com/ > -- Geoffrey Spear http://www.geoffreyspear.com/ |