From: Waldemar B. <wb...@sa...> - 2007-12-04 22:15:23
|
Hello! At the end I've enclosed the little code of Perl/Win32:GUI. If you start the code you can notice that the sequence is the following: 1. Window appears on the screen. 2. An incomplete "field1" appears too. 3. After 2 seconds it disappears!!! for next 2 seconds and the field "field2" is displayed also incomplete. 4. At the end both fields are displayed correctly. Could anyone of you predict this disappearance looking at the code? If yes please let me know how to get the following sequence of events: 1. The first complete "field1" is displayed at the beginning. 2. After two seconds the second field is also displayed, but still the first is visible. And additional question: is this behavior (unlogical for me) the feature of Perl Win32::GUI or native Win32-GUI itself? Regards Waldemar ################################# #!/usr/bin/perl -w use warnings; use strict; use Win32::GUI qw(); my $my_window = new Win32::GUI::Window ( -name => 'my_window', -size => [ 400, 400 ], ); $my_window->Show(1); my $field1 = $my_window->AddTextfield( -name => 'field1', -text => 'field1', -pos => [ 30, 30 ], -size => [ 100, 100 ], ); $field1->SetFocus(); sleep(2); my $field2 = $my_window->AddTextfield( -name => 'field2', -text => 'field2', -pos => [ 130, 130 ], -size => [ 100, 100 ], ); $field2->SetFocus(); sleep(2); Win32::GUI::Dialog(); ################################# |