****************** wx.combo.ComboCtrl ****************** Inheritance diagram for `wx.combo.ComboCtrl`: | .. inheritance-diagram:: wx.combo.ComboCtrl | Description =========== A combo control is a generic combobox that allows totally custom popup. In addition it has other customization features. For instance, position and size of the dropdown button can be changed. **Setting Custom Popup for wx.combo.ComboCtrl:** `wx.combo.ComboCtrl` needs to be told somehow which control to use and this is done by `SetPopupControl()`. However, we need something more than just a `wx.Control <../Widgets/wx.Control.html>`_ in this method as, for example, we need to call `SetStringValue <#SetStringValue>`_ ("initial text value") and `wx.Control` doesn't have such method. So we also need a `wx.combo.ComboPopup `_ which is an interface which must be implemented by a control to be usable as a popup. We couldn't derive `wx.combo.ComboPopup` from `wx.Control` as this would make it impossible to have a class deriving from a wxWidgets control and from it, so instead it is just a mix-in. Here's a minimal sample of `wx.ListCtrl <../Widgets/wx.ListCtrl.html>`_ popup:: class ListCtrlComboPopup(wx.ListCtrl, wx.combo.ComboPopup): def __init__(self): # Since we are using multiple inheritance, and don't know yet # which window is to be the parent, we'll do 2-phase create of # the ListCtrl instead, and call its Create method later in # our Create method. (See Create below.) self.PostCreate(wx.PreListCtrl()) # Also init the ComboPopup base class. wx.combo.ComboPopup.__init__(self) def AddItem(self, txt): self.InsertStringItem(self.GetItemCount(), txt) def OnMotion(self, evt): item, flags = self.HitTest(evt.GetPosition()) if item >= 0: self.Select(item) self.curitem = item def OnLeftDown(self, evt): self.value = self.curitem self.Dismiss() # The following methods are those that are overridable from the # ComboPopup base class. def Init(self): """ This is called immediately after construction finishes. You can use self.GetCombo if needed to get to the ComboCtrl instance. """ self.value = -1 self.curitem = -1 def Create(self, parent): """ Create the popup child control. Return True for success. """ wx.ListCtrl.Create(self, parent, style=wx.LC_LIST|wx.LC_SINGLE_SEL|wx.SIMPLE_BORDER) self.Bind(wx.EVT_MOTION, self.OnMotion) self.Bind(wx.EVT_LEFT_DOWN, self.OnLeftDown) return True def GetControl(self): """ Return the widget that is to be used for the popup. """ return self def SetStringValue(self, val): """ Called just prior to displaying the popup, you can use it to 'select' the current item. """ idx = self.FindItem(-1, val) if idx != wx.NOT_FOUND: self.Select(idx) def GetStringValue(self): """ Return a string representation of the current item. """ if self.value >= 0: return self.GetItemText(self.value) return "" def OnPopup(self): """ Called immediately after the popup is shown. """ wx.combo.ComboPopup.OnPopup(self) def OnDismiss(self): " Called when popup is dismissed. """ wx.combo.ComboPopup.OnDismiss(self) Here's how you would create and populate it in a dialog/frame constructor:: cc = wx.combo.ComboCtrl(self, style=0, size=(250,-1)) # Create a Popup popup = ListCtrlComboPopup() # Associate them with each other. This also triggers the # creation of the ListCtrl. cc.SetPopupControl(popup) # Add some items to the listctrl. for x in range(75): popup.AddItem("Item-%02d" % x) .. seealso:: `wx.ComboBox <../Widgets/wx.ComboBox.html>`_, `wx.Choice <../Widgets/wx.Choice.html>`_, `wx.combo.OwnerDrawnComboBox `_, `wx.combo.ComboPopup `_, `wx.CommandEvent <../Events/wx.CommandEvent.html>`_ Derived From ^^^^^^^^^^^^^ * `wx.Control <../Widgets/wx.Control.html>`_ * `wx.Window <../Widgets/wx.Window.html>`_ * `wx.EvtHandler <../Widgets/wx.EvtHandler.html>`_ * `wx.Object <../Widgets/wx.Object.html>`_ Known Subclasses ^^^^^^^^^^^^^^^^ `wx.combo.BitmapComboBox `_, `wx.combo.ComboCtrl `_, `wx.combo.OwnerDrawnComboBox `_ Window Styles ^^^^^^^^^^^^^ ================================================== ================================================== Window Style Description ================================================== ================================================== ``wx.CB_READONLY`` Same as ``wx.CB_DROPDOWN`` but only the strings specified as the combobox choices can be selected, it is impossible to select (even from a program) a string which is not in the choices list. ``wx.CB_SORT`` Sorts the entries in the list alphabetically. ``wx.TE_PROCESS_ENTER`` The control will generate the event ``wx.EVT_COMMAND_TEXT_ENTER`` (otherwise pressing ``Enter`` key is either processed internally by the control or used for navigation between dialog controls). Windows only. ``wx.combo.CC_SPECIAL_DCLICK`` Double-clicking triggers a call to popup's `OnComboDoubleClick`. Actual behaviour is defined by a derived class. For instance, `wx.combo.OwnerDrawnComboBox `_ will cycle an item. This style only applies if ``wx.CB_READONLY`` is used as well. ``wx.combo.CC_STD_BUTTON`` Drop button will behave more like a standard push button. ================================================== ================================================== Event Handling ^^^^^^^^^^^^^^ ================================================== ================================================== Event Name Description ================================================== ================================================== wx.EVT_TEXT(id, func) Process a ``wx.wxEVT_COMMAND_TEXT_UPDATED`` event, when the text changes. wx.EVT_TEXT_ENTER(id, func) Process a ``wx.wxEVT_COMMAND_TEXT_ENTER`` event, when ``RETURN`` is pressed in the combo control. ================================================== ================================================== | Control Appearance ^^^^^^^^^^^^^^^^^^ | .. figure:: ../images/wxWidgets/wxmsw/comboctrl.png :alt: wxMSW :figclass: floatleft **wxMSW** .. figure:: ../images/wxWidgets/wxmac/comboctrl.png :alt: wxMAC :figclass: floatright **wxMAC** .. figure:: ../images/wxWidgets/wxgtk/comboctrl.png :alt: wxGTK :figclass: floatcenter **wxGTK** | Methods Summary ^^^^^^^^^^^^^^^ * `__init__ <#__init__>`_ * `AnimateShow <#AnimateShow>`_ * `Copy <#Copy>`_ * `Create <#Create>`_ * `Cut <#Cut>`_ * `DoShowPopup <#DoShowPopup>`_ * `EnablePopupAnimation <#EnablePopupAnimation>`_ * `GetBitmapDisabled <#GetBitmapDisabled>`_ * `GetBitmapHover <#GetBitmapHover>`_ * `GetBitmapNormal <#GetBitmapNormal>`_ * `GetBitmapPressed <#GetBitmapPressed>`_ * `GetButton <#GetButton>`_ * `GetButtonSize <#GetButtonSize>`_ * `GetCustomPaintWidth <#GetCustomPaintWidth>`_ * `GetFeatures <#GetFeatures>`_ * `GetInsertionPoint <#GetInsertionPoint>`_ * `GetInternalFlags <#GetInternalFlags>`_ * `GetLastPosition <#GetLastPosition>`_ * `GetMainWindowOfCompositeControl <#GetMainWindowOfCompositeControl>`_ * `GetPopupControl <#GetPopupControl>`_ * `GetPopupWindow <#GetPopupWindow>`_ * `GetPopupWindowState <#GetPopupWindowState>`_ * `GetTextCtrl <#GetTextCtrl>`_ * `GetTextIndent <#GetTextIndent>`_ * `GetTextRect <#GetTextRect>`_ * `GetValue <#GetValue>`_ * `HidePopup <#HidePopup>`_ * `IsCreated <#IsCreated>`_ * `IsKeyPopupToggle <#IsKeyPopupToggle>`_ * `IsPopupShown <#IsPopupShown>`_ * `IsPopupWindowState <#IsPopupWindowState>`_ * `OnButtonClick <#OnButtonClick>`_ * `OnPopupDismiss <#OnPopupDismiss>`_ * `Paste <#Paste>`_ * `PrepareBackground <#PrepareBackground>`_ * `Remove <#Remove>`_ * `Replace <#Replace>`_ * `SetButtonBitmaps <#SetButtonBitmaps>`_ * `SetButtonPosition <#SetButtonPosition>`_ * `SetCtrlMainWnd <#SetCtrlMainWnd>`_ * `SetCustomPaintWidth <#SetCustomPaintWidth>`_ * `SetInsertionPoint <#SetInsertionPoint>`_ * `SetInsertionPointEnd <#SetInsertionPointEnd>`_ * `SetMark <#SetMark>`_ * `SetPopupAnchor <#SetPopupAnchor>`_ * `SetPopupControl <#SetPopupControl>`_ * `SetPopupExtents <#SetPopupExtents>`_ * `SetPopupMaxHeight <#SetPopupMaxHeight>`_ * `SetPopupMinWidth <#SetPopupMinWidth>`_ * `SetText <#SetText>`_ * `SetTextIndent <#SetTextIndent>`_ * `SetValue <#SetValue>`_ * `SetValueWithEvent <#SetValueWithEvent>`_ * `ShouldDrawFocus <#ShouldDrawFocus>`_ * `ShowPopup <#ShowPopup>`_ * `Undo <#Undo>`_ * `UseAltPopupWindow <#UseAltPopupWindow>`_ Properties Summary ^^^^^^^^^^^^^^^^^^ * `BitmapDisabled <#BitmapDisabled>`_ * `BitmapHover <#BitmapHover>`_ * `BitmapNormal <#BitmapNormal>`_ * `BitmapPressed <#BitmapPressed>`_ * `Button <#Button>`_ * `ButtonSize <#ButtonSize>`_ * `CustomPaintWidth <#CustomPaintWidth>`_ * `InsertionPoint <#InsertionPoint>`_ * `PopupControl <#PopupControl>`_ * `PopupWindow <#PopupWindow>`_ * `PopupWindowState <#PopupWindowState>`_ * `TextCtrl <#TextCtrl>`_ * `TextIndent <#TextIndent>`_ * `TextRect <#TextRect>`_ * `Value <#Value>`_ Class API ========= Methods ^^^^^^^ .. method:: __init__(parent, id=wx.ID_ANY, value="", pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, validator=wx.DefaultValidator, name=wx.PyComboBoxNameStr) Constructor, creating and showing a combo control. **Parameters:** * `parent` (`wx.Window <../Widgets/wx.Window.html>`_) * `id` (int) * `value` (string) * `pos` (`wx.Point <../Widgets/wx.Point.html>`_) * `size` (`wx.Size <../Widgets/wx.Size.html>`_) * `style` (long) * `validator` (`wx.Validator <../Widgets/wx.Validator.html>`_) * `name` (string) | **Returns:** `wx.combo.ComboCtrl `_ -------- .. method:: AnimateShow(rect, flags) Implement in derived class to create a drop-down animation. Returns ``True`` if finished immediately. Otherwise the popup is only shown when the derived class calls `DoShowPopup <#DoShowPopup>`_. `flags` are same as for `DoShowPopup` **Parameters:** * `rect` (`wx.Rect <../Widgets/wx.Rect.html>`_) * `flags` (int) | **Returns:** `bool` -------- .. method:: Copy() Copies the selected text to the clipboard. -------- .. method:: Create(parent, id=-1, pos=wx.DefaultPosition, size=wx.DefaultSize, style=0, validator=wx.DefaultValidator, name=wx.PyComboBoxNameStr) Creates the combo control for two-step construction. Derived classes should call or replace this function. **Parameters:** * `parent` (`wx.Window <../Widgets/wx.Window.html>`_) * `id` (int) * `value` (string) * `pos` (`wx.Point <../Widgets/wx.Point.html>`_) * `size` (`wx.Size <../Widgets/wx.Size.html>`_) * `style` (long) * `validator` (`wx.Validator <../Widgets/wx.Validator.html>`_) * `name` (string) | **Returns:** `bool` -------- .. method:: Cut() Copies the selected text to the clipboard and removes the selection. -------- .. method:: DoShowPopup(rect, flags) This member function is not normally called in application code. Instead, it must be called in a derived class to make sure popup is properly shown after a popup animation has finished (but only if `AnimateShow <#AnimateShow>`_ did not finish the animation within it's function scope). `flags` may be one of the following bits: =================================== ============================ Flags Description =================================== ============================ ``wx.combo.ComboCtrl.ShowBelow`` Showing popup below the control ``wx.combo.ComboCtrl.ShowAbove`` Showing popup above the control ``wx.combo.ComboCtrl.CanDeferShow`` Can only return ``True`` from `AnimateShow <#AnimateShow>`_ if this is set =================================== ============================ | **Parameters:** * `rect` (`wx.Rect <../Widgets/wx.Rect.html>`_): Position to show the popup window at, in screen coordinates. * `flags` (int): Combination of any of the aforementioned flags. -------- .. method:: EnablePopupAnimation(enable=True) Enables or disables popup animation, if any, depending on the value of the argument. **Parameters:** * `enable` (bool) -------- .. method:: GetBitmapDisabled() Returns disabled button bitmap that has been set with `SetButtonBitmaps <#SetButtonBitmaps>`_. | **Returns:** `wx.Bitmap <../Widgets/wx.Bitmap.html>`_ -------- .. method:: GetBitmapHover() Returns button mouse hover bitmap that has been set with `SetButtonBitmaps <#SetButtonBitmaps>`_. | **Returns:** `wx.Bitmap <../Widgets/wx.Bitmap.html>`_ -------- .. method:: GetBitmapNormal() Returns default button bitmap that has been set with `SetButtonBitmaps <#SetButtonBitmaps>`_. | **Returns:** `wx.Bitmap <../Widgets/wx.Bitmap.html>`_ -------- .. method:: GetBitmapPressed() Returns depressed button bitmap that has been set with `SetButtonBitmaps <#SetButtonBitmaps>`_. | **Returns:** `wx.Bitmap <../Widgets/wx.Bitmap.html>`_ -------- .. method:: GetButton() Get the dropdown button which is part of the combobox. | **Returns:** `wx.Window <../Widgets/wx.Window.html>`_ .. note:: it's not necessarily a `wx.Button <../Widgets/wx.Button.html>`_ or `wx.BitmapButton <../Widgets/wx.BitmapButton.html>`_. -------- .. method:: GetButtonSize() Returns current size of the dropdown button. | **Returns:** `wx.Size <../Widgets/wx.Size.html>`_ -------- .. method:: GetCustomPaintWidth() Returns custom painted area in control. | **Returns:** `int` .. seealso:: `SetCustomPaintWidth <#SetCustomPaintWidth>`_ -------- .. method:: GetFeatures() Returns features supported by `wx.combo.ComboCtrl`. Value returned is a combination of following flags (in `wx.combo.ComboCtrlFeatures` structure): =================== ========================================== Feature Description =================== ========================================== ``MovableButton`` Button can be on either side of the control. ``BitmapButton`` Button may be replaced with bitmap. ``ButtonSpacing`` Button can have spacing. ``TextIndent`` `SetTextIndent <#SetTextIndent>`_ works. ``PaintControl`` Combo control itself can be custom painted. ``PaintWritable`` A variable- width area in front of writable combo control's textctrl can be custom painted. ``Borderless`` ``wx.NO_BORDER`` window style works. ``All`` All of the above. =================== ========================================== | **Returns:** `int` -------- .. method:: GetInsertionPoint() Returns the insertion point for the combo control's text field. | **Returns:** `long` .. note:: Under wxMSW, this function always returns 0 if the combo control doesn't have the focus. -------- .. method:: GetInternalFlags() `No docstrings available for this method.` -------- .. method:: GetLastPosition() Returns the last position in the combo control text field. | **Returns:** `long` -------- .. method:: GetMainWindowOfCompositeControl() `No docstrings available for this method.` -------- .. method:: GetPopupControl() Returns current popup interface that has been set with `SetPopupControl <#SetPopupControl>`_. | **Returns:** `wx.combo.ComboPopup `_ -------- .. method:: GetPopupWindow() Returns popup window containing the popup control. | **Returns:** `wx.Window <../Widgets/wx.Window.html>`_ -------- .. method:: GetPopupWindowState() `No docstrings available for this method.` -------- .. method:: GetTextCtrl() Get the text control which is part of the combo control. | **Returns:** `wx.TextCtrl <../Widgets/wx.TextCtrl.html>`_ -------- .. method:: GetTextIndent() Returns actual indentation in pixels. | **Returns:** `int` -------- .. method:: GetTextRect() Returns area covered by the text field (includes everything except borders and the dropdown button). | **Returns:** `wx.Rect <../Widgets/wx.Rect.html>`_ -------- .. method:: GetValue() Returns text representation of the current value. For writable combo control it always returns the value in the text field. | **Returns:** `string` -------- .. method:: HidePopup() Dismisses the popup window. -------- .. method:: IsCreated() Return ``True`` if `Create <#Create>`_ has finished. | **Returns:** `bool` -------- .. method:: IsKeyPopupToggle(event) Returns ``True`` if given key combination should toggle the popup. **Parameters:** * `event` (`wx.KeyEvent <../Events/wx.KeyEvent.html>`_) | **Returns:** `bool` -------- .. method:: IsPopupShown() Returns ``True`` if the popup is currently shown | **Returns:** `bool` -------- .. method:: IsPopupWindowState(state) Returns ``True`` if the popup window is in the given state. Possible values are: ================================ ======================== Popup State Description ================================ ======================== ``wx.combo.ComboCtrl.Hidden`` Popup window is hidden. ``wx.combo.ComboCtrl.Animating`` Popup window is being shown, but the popup animation has not yet finished. ``wx.combo.ComboCtrl.Visible`` Popup window is fully visible. ================================ ======================== | **Parameters:** * `state` (int) | **Returns:** `bool` -------- .. method:: OnButtonClick() Implement in a derived class to define what happens on dropdown button click. Default action is to show the popup. -------- .. method:: OnPopupDismiss() Common code to be called on popup hide/dismiss. -------- .. method:: Paste() Pastes text from the clipboard to the text field. -------- .. method:: PrepareBackground(dc, rect, flags) Prepare background of combo control or an item in a dropdown list in a way typical on platform. This includes painting the focus/disabled background and setting the clipping region. Unless you plan to paint your own focus indicator, you should always call this in your `PaintComboControl` implementation. In addition, it sets pen and text colour to what looks good and proper against the background. `flags` are the same as `wx.RendererNative <../Widgets/wx.RendererNative.html>`_ flags: ======================== ============================================ Flags Description ======================== ============================================ ``wx.CONTROL_ISSUBMENU`` drawing a list item instead of combo control ``wx.CONTROL_SELECTED`` list item is selected ``wx.CONTROL_DISABLED`` control/item is disabled ======================== ============================================ | **Parameters:** * `dc` (`wx.DC <../Widgets/wx.DC.html>`_) * `rect` (`wx.Rect <../Widgets/wx.Rect.html>`_) * `flags` (int) -------- .. method:: Remove(from, to) Removes the text between the two positions in the combo control text field. **Parameters:** * `from` (long): The first position. * `to` (long): The last position. -------- .. method:: Replace(from, to) Replaces the text between two positions with the given text, in the combo control text field. **Parameters:** * `from` (long): The first position. * `to` (long): The second position. -------- .. method:: SetButtonBitmaps(bmpNormal, pushButtonBg=False, bmpPressed=wx.NullBitmap, bmpHover=wx.NullBitmap, bmpDisabled=wx.NullBitmap) Sets custom dropdown button graphics. **Parameters:** * `bmpNormal` (`wx.Bitmap <../Widgets/wx.Bitmap.html>`_): Default button image. * `pushButtonBg` (bool): If ``True``, blank push button background is painted below the image. * `bmpPressed` (`wx.Bitmap <../Widgets/wx.Bitmap.html>`_): Depressed button image. * `bmpHover` (`wx.Bitmap <../Widgets/wx.Bitmap.html>`_): Button image when mouse hovers above it. This should be ignored on platforms and themes that do not generally draw different kind of button on mouse hover. * `bmpDisabled` (`wx.Bitmap <../Widgets/wx.Bitmap.html>`_): Disabled button image. -------- .. method:: SetButtonPosition(width=-1, height=-1, side=wx.RIGHT, spacingX=0) Sets size and position of dropdown button. **Parameters:** * `width` (int): Button width. Value <= 0 specifies default. * `height` (int): Button height. Value <= 0 specifies default. * `side` (int): Indicates which side the button will be placed. Value can be ``wx.LEFT`` or ``wx.RIGHT``. * `spacingX` (int): Horizontal spacing around the button. Default is 0. -------- .. method:: SetCtrlMainWnd(wnd) | **Parameters:** * `wnd` (`wx.Window <../Widgets/wx.Window.html>`_) -------- .. method:: SetCustomPaintWidth(width) Set width, in pixels, of custom painted area in control without ``wx.CB_READONLY`` style. In read-only `wx.combo.OwnerDrawnComboBox `_, this is used to indicate area that is not covered by the focus rectangle. **Parameters:** * `width` (int) -------- .. method:: SetInsertionPoint(pos) Sets the insertion point in the text field. **Parameters:** * `pos` (int): The new insertion point. -------- .. method:: SetInsertionPointEnd() Sets the insertion point at the end of the combo control text field. -------- .. method:: SetMark(from, to) | **Parameters:** * `from` (long) * `to` (long) -------- .. method:: SetPopupAnchor(anchorSide) Set side of the control to which the popup will align itself. Valid values are ``wx.LEFT``, ``wx.RIGHT`` and 0. The default value 0 means that the most appropriate side is used (which, currently, is always ``wx.LEFT``). **Parameters:** * `anchorSide` (int) -------- .. method:: SetPopupControl(popup) Set popup interface class derived from `wx.combo.ComboPopup `_. This method should be called as soon as possible after the control has been created, unless `OnButtonClick <#OnButtonClick>`_ has been overridden. **Parameters:** * `popup` (`wx.combo.ComboPopup `_) -------- .. method:: SetPopupExtents(extLeft, extRight) Extends popup size horizontally, relative to the edges of the combo control. **Parameters:** * `extLeft` (int): How many pixel to extend beyond the left edge of the control. Default is 0. * `extRight` (int): How many pixel to extend beyond the right edge of the control. Default is 0. .. note:: Popup minimum width may override arguments. -------- .. method:: SetPopupMaxHeight(height) Sets preferred maximum height of the popup. **Parameters:** * `height` (int) .. note:: Value -1 indicates the default. -------- .. method:: SetPopupMinWidth(width) Sets minimum width of the popup. If wider than combo control, it will extend to the left. **Parameters:** * `width` (int) .. note:: Value -1 indicates the default. -------- .. method:: SetText(value) Sets the text for the text field without affecting the popup. Thus, unlike `SetValue <#SetValue>`_, it works equally well with combo control using ``wx.CB_READONLY`` style. **Parameters:** * `value` (string) -------- .. method:: SetTextIndent(indent) This will set the space in pixels between left edge of the control and the text, regardless whether control is read-only or not. Value -1 can be given to indicate platform default. **Parameters:** * `indent` (int) -------- .. method:: SetValue(value) Sets the text for the combo control text field. **Parameters:** * `value` (string) .. note:: For a combo control with ``wx.CB_READONLY`` style the string must be accepted by the popup (for instance, exist in the dropdown list), otherwise the call to `SetValue` is ignored. -------- .. method:: SetValueWithEvent(value, withEvent=True) Same as `SetValue <#SetValue>`_, but also sends `wx.CommandEvent <../Events/wx.CommandEvent.html>`_ of type ``wx.wxEVT_COMMAND_TEXT_UPDATED`` if `withEvent` is ``True``. **Parameters:** * `value` (string) * `withEvent` (bool) -------- .. method:: ShouldDrawFocus() Returns ``True`` if focus indicator should be drawn in the control. | **Returns:** `bool` -------- .. method:: ShowPopup() Show the popup. -------- .. method:: Undo() Undoes the last edit in the text field. Windows only. -------- .. method:: UseAltPopupWindow(enable=True) Enable or disable usage of an alternative popup window, which guarantees ability to focus the popup control, and allows common native controls to function normally. This alternative popup window is usually a `wx.Dialog <../Widgets/wx.Dialog.html>`_, and as such, when it is shown, its parent top-level window will appear as if the focus has been lost from it. **Parameters:** * `enable` (bool) -------- Properties ^^^^^^^^^^ .. attribute:: BitmapDisabled See `GetBitmapDisabled <#GetBitmapDisabled>`_ .. attribute:: BitmapHover See `GetBitmapHover <#GetBitmapHover>`_ .. attribute:: BitmapNormal See `GetBitmapNormal <#GetBitmapNormal>`_ .. attribute:: BitmapPressed See `GetBitmapPressed <#GetBitmapPressed>`_ .. attribute:: Button See `GetButton <#GetButton>`_ .. attribute:: ButtonSize See `GetButtonSize <#GetButtonSize>`_ .. attribute:: CustomPaintWidth .. attribute:: InsertionPoint .. attribute:: PopupControl Returns the current popup interface that has been set with `SetPopupControl <#SetPopupControl>`_. .. attribute:: PopupWindow Returns the popup window containing the popup control. .. attribute:: PopupWindowState .. attribute:: TextCtrl Get the text control which is part of the combo control. .. attribute:: TextIndent Returns actual indentation in pixels. .. attribute:: TextRect Returns area covered by the text field (includes everything except borders and the dropdown button). .. attribute:: Value Returns text representation of the current value. For writable combo control it always returns the value in the text field.