From: Robert M. <rob...@us...> - 2007-11-10 11:22:57
|
On 26/09/2007, a98...@gm... <a98...@gm...> wrote: > I want to make an input with a dialogbox. > but I've the problem that the program continues while the dialogbox is > open. > > how can i make the script waiting for closing the dialogbox? As you haven't posted a *short* and *complete* example of what you are trying to do, I can't really understand what it is that you are asking. I *suspect* that you want something like $filenameDlg->DoModal(); after your line $filenameDlg->Show(); I can't be more exact without a complete script to modify. The tutorial in the documents covers this. regards, Rob. > > thx > juergen > > > my script: > [snip] > do_something... > ask_filename(); > do_the_rest... > > sub ask_filename { > # Create Find DialogBox > my $filenameDlg =3D new Win32::GUI::DialogBox( > -name =3D> "FileDlg", > -title =3D> "Filename", > -pos =3D> [ 150, 150 ], > -size =3D> [ 360, 115 ], > ); > > # Filename > $filenameDlg->AddTextfield ( > -name =3D> "FileDlg_Text", > -pos =3D> [10, 12], > -size =3D> [220, 21], > -prompt =3D> [ "Filename: ", 45], > -tabstop =3D> 1, > ); > > $filenameDlg->AddButton ( > -name =3D> "FileDlg_OK", > -text =3D> "&OK", > -pos =3D> [270, 10], > -size =3D> [75 , 21], > -onClick =3D> sub { $filenameDlg->Hide(); $filename=3D$f= ilenameDlg->FileDlg_Text->Text; return 0; }, > -group =3D> 1, > -tabstop =3D> 1, > ); > > # Cancel Button > $filenameDlg->AddButton ( > -name =3D> "FileDlg_Cancel", > -text =3D> "C&ancel", > -pos =3D> [270, 40], > -size =3D> [75 , 21], > -onClick =3D> sub { $filenameDlg->Hide(); 0; }, > -tabstop =3D> 1, > ); > $filenameDlg->FileDlg_Text->SetFocus(); > $filenameDlg->Show(); > return 0; > } > [/snip] > -- > Psssst! Schon vom neuen GMX MultiMessenger geh=F6rt? > Der kanns mit allen: http://www.gmx.net/de/go/multimessenger > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > 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 Please update your address book with my new email address: ro...@th... |