Dave,

It's probably a good idea to put the $Win->Show(); at the end of the
'stored_Click 'sub, that is, after you added all the controls. And from what I
remember, you should only call Win32::GUI::Dialog(); once.

regards,

erick bourgeois
never stop questionning
www.jeb.ca

----- Original Message -----
From: Dave <[EMAIL PROTECTED]>
To: <perl-win32-gui-users@lists.sourceforge.net>
Sent: Thursday, May 24, 2001 9:19 AM
Subject: [perl-win32-gui-users] New window?


| I am having a problem with a dialog box. The main problem is, it won't
| show up. Below is the code I am using to open a new window from my main
| window when a button is pushed ( store ) . Before this code is all of my
| normal application code ( which works fine ). I have tried it with and
| without the first and second Win32::GUI::Dialog(); entries. Neither will
| make the new window appear. Can someone please tell me what I am doing
| wrong?
|
|
| <MainWindow GUI code is here >
| $MainWindow->Show();
|
| Win32::GUI::Dialog();
|
| <subs for main window are here>
|
| sub stored_Click {
|       $Win=Win32::GUI::DialogBox->new(
| #      -left   => 341,
| #      -top    => 218,
|       -width  => 563,
|       -height => 368,
|       -name   => "Win",
|       -title   => "Window Title"
|       );
|
| $Win->Show();
|
| $Win->AddRichEdit(
|        -text    => "",
|        -name    => "RichEdit_1",
|        -left    => 1,
|        -top     => 1,
|        -width   => 552,
|        -height  => 306,
|       );
|
| $Win->AddButton(
|        -text    => "Save",
|        -name    => "instrsave",
|        -left    => 132,
|        -top     => 316,
|        -width   => 90,
|        -height  => 21,
|        -foreground    => 0,
|       );
|
| $Win->AddButton(
|        -text    => "Cancel",
|        -name    => "popupcancel",
|        -left    => 343,
|        -top     => 315,
|        -width   => 95,
|        -height  => 21,
|        -foreground    => 0,
|       );
| }
| Win32::GUI::Dialog();
| sub Window_Terminate {
|     return -1;
| }
|
| sub Close_Click {
|     Window_Terminate();
| };
|
|
| _______________________________________________
| Perl-Win32-GUI-Users mailing list
| Perl-Win32-GUI-Users@lists.sourceforge.net
| http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
|


Reply via email to