Home | Trees | Index | Help |
|
---|
Package wx :: Module combo :: Class ComboPopup |
|
object
--+
|
ComboPopup
In order to use a custom popup with wx.combo.ComboCtrl
an interface
class derived from wx.combo.ComboPopup is used to manage the interface
between the popup control and the popup. You can either derive a new
class from both the widget class and this ComboPopup class, or the
derived class can have a reference to the widget used for the popup.
In either case you simply need to return the widget from the
GetControl
method to allow the ComboCtrl to interact with it.
Nearly all of the methods of this class are overridable in Python.
Method Summary | |
---|---|
ComboPopup |
Constructor |
__del__(self)
| |
bool |
The derived class must implement this method to create the popup control. |
Default PaintComboControl behaviour (Static method) | |
Hides the popup | |
Size |
The derived class may implement this method to return adjusted size for the popup control, according to the variables given. |
ComboCtrl |
Returns a reference to the wx.combo.ComboCtrl this ComboPopup object
is associated with. |
Window |
The derived class must implement this method and it should return a reference to the widget created in the Create method. |
String |
Gets the string representation of the currently selected value to be used to display in the combo widget. |
This method is called after the popup is contructed and has been assigned to the ComboCtrl. | |
bool |
Returns true if Create has been called. |
bool |
The derived class may implement this to return True if it wants to delay the call to Create until the popup is shown for the first
time. |
Implement this method in the derived class if you need to support special actions when the user double-clicks on the parent ComboCtrl. | |
Receives key events from the parent ComboCtrl. | |
The derived class may implement this to do special processing when popup is hidden. | |
The derived class may implement this to do special processing when popup is shown. | |
This is called to custom paint in the combo control itself (ie. | |
Called just prior to displaying the popup. |
Property Summary | |
---|---|
thisown : The membership flag |
Instance Method Details |
---|
__init__(self)
|
Create(self, parent)The derived class must implement this method to create the popup control. It should be a child of the parent passed in, but other than that there is much flexibility in what the widget can be, its style, etc. Return True for success, False otherwise. (NOTE: this return value is not currently checked...)
|
Dismiss(self)Hides the popup |
GetAdjustedSize(self, minWidth, prefHeight, maxHeight)The derived class may implement this method to return adjusted size
for the popup control, according to the variables given. It is called
on every popup, just prior to
|
GetCombo(self)Returns a reference to the
|
GetControl(self)The derived class must implement this method and it should return a
reference to the widget created in the
|
GetStringValue(self)Gets the string representation of the currently selected value to be used to display in the combo widget.
|
Init(self)This method is called after the popup is contructed and has been assigned to the ComboCtrl. Derived classes can override this to do extra inialization or whatever. |
IsCreated(self)Returns true if
|
LazyCreate(self)The derived class may implement this to return True if it wants to
delay the call to
|
OnComboDoubleClick(self)Implement this method in the derived class if you need to support special actions when the user double-clicks on the parent ComboCtrl. |
OnComboKeyEvent(self, event)Receives key events from the parent ComboCtrl. Events not handled should be skipped, as usual.
|
OnDismiss(self)The derived class may implement this to do special processing when popup is hidden. |
OnPopup(self)The derived class may implement this to do special processing when popup is shown. |
PaintComboControl(self, dc, rect)This is called to custom paint in the combo control itself (ie. not the popup). Default implementation draws the current value as string.
|
SetStringValue(self, value)Called just prior to displaying the popup. The derived class can implement this to "select" the item in the popup that coresponds to the passed in string value, if appropriate. The default implementation does nothing.
|
Static Method Details |
---|
DefaultPaintComboControl(combo, dc, rect)Default PaintComboControl behaviour
|
Property Details |
---|
thisownThe membership flag
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:11:12 2007 | http://epydoc.sf.net |