I don't quite see where your problem is ... do you want to know HOW to update your window or WHEN? As for the how, your $sb->Text("whatever"); should work fine anytime. As for the when, maybe you are looking for a timer so that you can update the status bar every other second or so.
No offence, but maybe you just need to grasp the messaging concept of windows? I mean, when does which part of the script run and pass control where? That can admittedly be confusing. Forgive me, if that was not what you wanted to know: Your Win32::GUI::Dialog(); call (btw: where IS your Dialog() call??) passes control to the GUI, which loops for events and calls the event handlers (e.g. your Button_Click sub) until ANY of these subs returns a negative number (not just Main_Terminate). A lot of those event handlers do some default stuff, like redraw all the controls of your window when it becomes visible. If you have an event handler that runs forever (maybe in a loop of your own that processes a giant file line by line), then the $sb->Text("20% done"); call does alter the status bars text property, but the redraw message, which writes the new text onto the window for you to see never gets called, because your program is inside this long running sub and not passing control back to the GUI Dialog loop. In that case, simply call Win32::GUI::DoEvents(); inside your script and the outstanding events will be acted upon. Again, sorry if this is not what you asked for. Have fun, Harald > -----Original Message----- > From: Louis Bohm [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 26, 2001 10:53 > To: perl-win32-gui-users@lists.sourceforge.net > Subject: [perl-win32-gui-users] Updating a window. > > > I am sure this is a really stupid question. But how do I > update things in > the window I create WITHOUT human intervention. > > Here is what I have for a script: > use Win32::GUI; > $main = Win32::GUI::Window->new( > -name => 'Main', > -width => 100, > -height => 100, > -text => 'Louis', > ); > $main->AddLabel( > -name => "Louis", > -text => "Hello World 1" > ); > $sb=$main->AddStatusBar( > -name => "Status" > ); > $sb->Text("Some data"); > $main->Show(); > Win32::GUI::Window(); > > sub Main_Terminate { > -1; > } > > sub Main_Resize { > $sb->Move(0, $main->ScaleHeight - $sb->Height); > $sb->Resize($main->ScaleWidth, $sb->Height); > } > > > Now what I would like to do it periodically update the text > in the status > bar with out the user getting involved. > > Thanks, > Louis > > -- > ¤¤º°`°º¤ø,¸¸,ø¤º°`°º¤øø¤º°`°º¤ø,¸¸,ø¤º°`°º¤øø¤º°`°º¤ > ¤°`°Lightbridge, Inc > ¤°`°67 South Bedford St. > ¤°`°Burlington MA 01832 > ¤°`°781.359.4795 mailto:[EMAIL PROTECTED] > ¤°`°http://www.lightbridge.com > ¤¤º°`°º¤ø,¸¸,ø¤º°`°º¤øø¤º°`°º¤ø,¸¸,ø¤º°`°º¤øø¤º°`°º¤ > > > _______________________________________________ > Perl-Win32-GUI-Users mailing list > Perl-Win32-GUI-Users@lists.sourceforge.net > http://lists.sourceforge.net/lists/listinfo/perl-win32-gui-users >