Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

How to clear the buffer: Win32::GUI

by Udhay (Initiate)
on Aug 11, 2012 at 07:12 UTC ( #986867=perlquestion: print w/replies, xml ) Need Help??
Udhay has asked for the wisdom of the Perl Monks concerning the following question:


I used Win32::GUI to develop a Window (actually two windows) only from main window one can access the sub window. I opened the sub window from main window and did some activity and closed it. When i opened that sub window second time the info are still there.

Can i able to clear all the contents which the win32::GUI holds by form close.

I have tried undef by exiting, can't able to access the window second time.

Replies are listed 'Best First'.
Re: How to clear the buffer: Win32::GUI
by rpnoble419 (Pilgrim) on Aug 11, 2012 at 10:21 UTC
    What are you trying to reset? if you are trying to reset input fields (ie: text box, list box, etc.) and you use the hide function to close/hide the sub window, then your window is still there with all of the data you input. You should create a function to reset the window to the default state when you execute any of the following events: Deactivate(), Hide() or Terminate() event. See onTerminate below.
    $Main = Win32::GUI::Window->new( -name => 'Main', -title => $appname, -pos => [10,10], -menu => $MainMenu, -maxsize => [500, 660], -onTerminate => \&Exit_Click, -onMinimize => \&DoHideMe_Click, -onTimer => sub{TimedOperation_Timer()}, -size => [500,650], );


      Thanks, for your response. I want to reset all input fields and window should return to its original state, without holding any input resources.

Re: How to clear the buffer: Win32::GUI
by Anonymous Monk on Aug 11, 2012 at 07:50 UTC

    Huh? What buffer?  $w->PostQuitMessage() ??

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://986867]
Approved by Old_Gray_Bear
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2018-07-22 15:02 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (454 votes). Check out past polls.