******************* wx.combo.ComboPopup ******************* Inheritance diagram for `wx.combo.ComboPopup`: | .. inheritance-diagram:: wx.combo.ComboPopup | Description =========== In order to use a custom popup with `wx.combo.ComboCtrl `_, an interface class must be derived from `wx.combo.ComboPopup`. For more information how to use it, see `wx.combo.ComboCtrl `_. .. seealso:: `wx.combo.ComboCtrl `_ Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `Create <#Create>`_ * `DefaultPaintComboControl <#DefaultPaintComboControl>`_ * `Dismiss <#Dismiss>`_ * `GetAdjustedSize <#GetAdjustedSize>`_ * `GetCombo <#GetCombo>`_ * `GetControl <#GetControl>`_ * `GetStringValue <#GetStringValue>`_ * `Init <#Init>`_ * `IsCreated <#IsCreated>`_ * `LazyCreate <#LazyCreate>`_ * `OnComboDoubleClick <#OnComboDoubleClick>`_ * `OnComboKeyEvent <#OnComboKeyEvent>`_ * `OnDismiss <#OnDismiss>`_ * `OnPopup <#OnPopup>`_ * `PaintComboControl <#PaintComboControl>`_ * `SetStringValue <#SetStringValue>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__() Default constructor. It is recommended that internal variables are prepared in `Init <#Init>`_. | **Returns:** `wx.combo.ComboPopup `_ -------- .. method:: Create(parent) The derived class must implement this to create the popup control. Returns ``True`` if the call succeeded, ``False`` otherwise. **Parameters:** * `parent` (`wx.Window <../Widgets/wx.Window.html>`_) | **Returns:** `bool` -------- .. method:: DefaultPaintComboControl(combo, dc, rect) Default `PaintComboControl <#PaintComboControl>`_ behaviour. **Parameters:** * `combo` (`wx.combo.ComboCtrl `_) * `dc` (`wx.DC <../Widgets/wx.DC.html>`_) * `rect` (`wx.Rect <../Widgets/wx.Rect.html>`_) -------- .. method:: Dismiss() Utility function that hides the popup. -------- .. method:: GetAdjustedSize(minWidth, prefHeight, maxHeight) The derived class may implement this to return adjusted size for the popup control, according to the variables given. **Parameters:** * `minWidth` (int): Preferred minimum width. * `prefHeight` (int): Preferred height. May be -1 to indicate no preference. * `maxHeight` (int): Preferred maximum height. | **Returns:** `wx.Size <../Widgets/wx.Size.html>`_ .. note:: This is called each time popup is about to be shown. -------- .. method:: GetCombo() Returns a reference to the `wx.combo.ComboCtrl `_ this `wx.combo.ComboPopup` object is associated with. | **Returns:** `wx.combo.ComboCtrl `_ -------- .. method:: GetControl() The derived class must implement this to return pointer to the associated control created in `Create <#Create>`_. | **Returns:** `wx.Window <../Widgets/wx.Window.html>`_ -------- .. method:: GetStringValue() The derived class must implement this to return string representation of the value. | **Returns:** `string` -------- .. method:: Init() The derived class must implement this to initialize its internal variables. This method is called immediately after construction finishes. Derived classes can override this to do extra inialization or whatever. -------- .. method:: IsCreated() Utility method that returns ``True`` if Create has been called. Useful in conjunction with `LazyCreate <#LazyCreate>`_. | **Returns:** `bool` -------- .. method:: LazyCreate() The derived class may implement this to return ``True`` if it wants to delay call to `Create <#Create>`_ until the popup is shown for the first time. It is more efficient, but on the other hand it is often more convenient to have the control created immediately. | **Returns:** `bool` .. note:: The base implementation returns ``False``. -------- .. method:: OnComboDoubleClick() The derived class may implement this to do something when the parent `wx.combo.ComboCtrl `_ gets double-clicked. -------- .. method:: OnComboKeyEvent(event) The derived class may implement this to receive key events from the parent `wx.combo.ComboCtrl `_. Events not handled should be skipped, as usual. **Parameters:** * `event` (`wx.KeyEvent <../Events/wx.KeyEvent.html>`_) -------- .. method:: OnDismiss() The derived class may implement this to do special processing when popup is hidden. -------- .. method:: OnPopup() The derived class may implement this to do special processing when popup is shown. -------- .. method:: PaintComboControl(dc, rect) The derived class may implement this to paint the parent `wx.combo.ComboCtrl `_. Default implementation draws value as string. **Parameters:** * `dc` (`wx.DC <../Widgets/wx.DC.html>`_) * `rect` (`wx.Rect <../Widgets/wx.Rect.html>`_) -------- .. method:: SetStringValue(value) The derived class must implement this to receive string value changes from `wx.combo.ComboCtrl `_. **Parameters:** * `value` (string)