wx.BusyInfo Class Reference

Inheritance diagram for wx.BusyInfo:

wx.Object

List of all members.

Public Member Functions

 BusyInfo (wxString message, Window parent)
 BusyInfo (string message, Window parent)
 BusyInfo (string message)
 BusyInfo (IntPtr wxObject)
override void Dispose ()


Detailed Description

This class makes it easy to tell your user that the program is temporarily busy. Just create a wx.BusyInfo object within a using scope block, a message window will be shown.

For example:

        using (wx.BusyInfo wait=new wx.BusyInfo("Please wait, working..."))
        {
          for (int i = 0; i < 100000; i++)
          {
            DoACalculation();
          }
It works by creating a window in the constructor, and deleting it in the destructor (on dispose). You may also want to call wx.App.TheApp.Yield() to refresh the window periodically (in case it had been obscured by other windows, for example) like this:

        using (wx.BusyInfo wait=new wx.BusyInfo("Please wait, working..."))
        {
          for (int i = 0; i < 100000; i++)
          {
            DoACalculation();
            if ( !(i & 1000) )
               wx.App.TheApp.SafeYield();
          }
        }
but take care to not cause undesirable reentrancies when doing it (see wx.App.Yield() for more details).

See also:
wx.App.Yield


Constructor & Destructor Documentation

wx.BusyInfo.BusyInfo ( IntPtr  wxObject  ) 

wx.BusyInfo.BusyInfo ( string  message  ) 

Constructs a busy info window as child of parent and displays msg in it.

Parameters:
message The message that will be shown while active.

wx.BusyInfo.BusyInfo ( string  message,
Window  parent 
)

Constructs a busy info window as child of parent and displays msg in it.

NB: If parent is not NULL you must ensure that it is not closed while the busy info is shown.

Parameters:
message The message that will be shown while active.

wx.BusyInfo.BusyInfo ( wxString  message,
Window  parent 
)

Constructs a busy info window as child of parent and displays msg in it.

NB: If parent is not NULL you must ensure that it is not closed while the busy info is shown.

Parameters:
message The message that will be shown while active.


Member Function Documentation

override void wx.BusyInfo.Dispose (  )  [virtual]

Reimplemented from wx.Object.


Manual of the wx.NET   (c) 2003-2011 the wx.NET project at   Get wx.NET at SourceForge.net. Fast, secure and Free Open Source software downloads