If you use DoModal(1), then other open windows are no longer active.  That
seems to work well, except that I've noticed that ComboBoxes don't work
properly.  They are greyed out.  (I'm using the GUI Loft to create my forms,
so maybe it's an interaction with that.  I haven't tested it otherwise.)

Brian Millham
This message traveled at least 44,000 miles to reach you!
[EMAIL PROTECTED] 
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Laurent ROCHER
Sent: Friday, December 03, 2004 11:54 PM
To: perl-win32-gui-users@lists.sourceforge.net
Subject: Re: [perl-win32-gui-users] Awaiting modal window closure

Hi,

With Win32::GUI 1.0, modal dialog are more easier to use.
You only need too call DoModal.

Laurent

See Sample below :

use strict;
use Win32::GUI;

my $MainWindow = Win32::GUI::Window->new(
            -text => "Main",
            -name => "MainWindow",
            -pos  => [ 200, 200 ],
            -size => [ 150, 100 ],
        );

$MainWindow->AddButton(
            -name => "OpenModal",
            -pos  => [ 15, 20 ],
            -text => "Open Modal Window",
        );

my $ModalWindow = Win32::GUI::DialogBox->new(
            -text => "Modal",
            -name => "ModalWindow",
            -pos  => [ 220, 220 ],
            -size => [ 150, 100 ],
        );

$ModalWindow->AddButton(
            -name => "CloseModal",
            -pos  => [ 15, 20 ],
            -text => "Close Modal Window",
        );

$MainWindow->Show();
Win32::GUI::Dialog();

sub OpenModal_Click {
  $ModalWindow->DoModal();
}

sub CloseModal_Click { 
  -1;
}



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Perl-Win32-GUI-Users mailing list
Perl-Win32-GUI-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users
---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 0450-1, 12/09/2004
Tested on: 12/9/2004 9:23:29 PM
avast! is copyright (c) 2000-2003 ALWIL Software.
http://www.avast.com





Reply via email to