In order to use a custom popup with wxComboCtrl, an interface class must be derived from wxComboPopup. For more information how to use it, see Setting Custom Popup for wxComboCtrl.
Default constructor. It is recommended that internal variables are prepared in Init instead (because m_combo is not valid in constructor).
Parent wxComboCtrl. This protected member variable is prepared automatically before Init is called.
bool Create(wxWindow* parent)
The derived class must implement this to create the popup control.
true if the call succeeded, false otherwise.
Utility function that hides the popup.
wxSize GetAdjustedSize(int minWidth, int prefHeight, int maxHeight)
The derived class may implement this to return adjusted size for the popup control, according to the variables given.
Called each time popup is about to be shown.
The derived class must implement this to return pointer to the associated control created in Create.
wxString GetStringValue() const
The derived class must implement this to return string representation of the value.
The derived class must implement this to initialize its internal variables. This method is called immediately after construction finishes. m_combo member variable has been initialized before the call.
bool IsCreated() const
Utility method that returns true if Create has been called.
Useful in conjunction with LazyCreate.
The derived class may implement this to return true if it wants to delay call to 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.
Base implementation returns false.
The derived class may implement this to do something when the parent wxComboCtrl gets double-clicked.
void OnComboKeyEvent(wxKeyEvent& event)
The derived class may implement this to receive key events from the parent wxComboCtrl.
Events not handled should be skipped, as usual.
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.
void PaintComboControl(wxDC& dc, const wxRect& rect)
The derived class may implement this to paint the parent wxComboCtrl.
Default implementation draws value as string.
void SetStringValue(const wxString& value)
The derived class must implement this to receive string value changes from wxComboCtrl.