Phoenix Logo

phoenix_title wx.lib.busy.BusyInfo

This class is just like wx.BusyInfo, except that its default size is smaller, (unless the size of the message requires a larger window size) and the background and foreground colors of the message box can be set.

Creating an instace of the class will create and show a window with the given message, and when the instance is deleted then that window will be closed. This class also implements the context manager magic methods, so it can be used with Python’s with statement, like this:

with BusyInfo('Please wait...'):
    doSomethingThatNeedsWaiting()

class_hierarchy Class Hierarchy

Inheritance diagram for class BusyInfo:


method_summary Methods Summary

__init__ Create a new BusyInfo.
Close Hide and close the busy info box.

api Class API



class BusyInfo(object)

This class is just like wx.BusyInfo, except that its default size is smaller, (unless the size of the message requires a larger window size) and the background and foreground colors of the message box can be set.

Creating an instace of the class will create and show a window with the given message, and when the instance is deleted then that window will be closed. This class also implements the context manager magic methods, so it can be used with Python’s with statement, like this:

with BusyInfo('Please wait...'):
    doSomethingThatNeedsWaiting()

Methods



__init__(self, msg, parent=None, bgColour=None, fgColour=None)

Create a new BusyInfo.

Parameters:
  • msg (string) – a string to be displayed in the BusyInfo window.
  • parent (wx.Window) – an optional window to be used as the parent of the :class:`BusyInfo. If given then the BusyInfo will be centered over that window, otherwise it will be centered on the screen.
  • bgColour (wx.Colour) – colour to be used for the background of the BusyInfo
  • fgColour (wx.Colour) – colour to be used for the foreground (text) of the BusyInfo


Close(self)

Hide and close the busy info box.