phoenix_title wx.adv.BitmapComboBox

A combobox that displays bitmap in front of the list items.

It currently only allows using bitmaps of one size, and resizes itself so that a bitmap can be shown next to the text field.

styles Window Styles

This class supports the following styles:

  • wx.CB_READONLY: Creates a combobox without a text editor. On some platforms the control may appear very different when this style is used.

  • wx.CB_SORT: Sorts the entries in the list alphabetically.

  • wx.TE_PROCESS_ENTER: The control will generate the event wxEVT_TEXT_ENTER (otherwise pressing Enter key is either processed internally by the control or used for navigation between dialog controls). Windows only.

events Events Emitted by this Class

Handlers bound for the following event types will receive a wx.CommandEvent parameter.

  • EVT_COMBOBOX: Process a wxEVT_COMBOBOX event, when an item on the list is selected.

  • EVT_TEXT: Process a wxEVT_TEXT event, when the combobox text changes.

  • EVT_TEXT_ENTER: Process a wxEVT_TEXT_ENTER event, when RETURN is pressed in the combobox.

Note

While wx.adv.BitmapComboBox contains the wx.ComboBox API, but it might not actually be derived from that class. In fact, if the platform does not have a native implementation, wx.adv.BitmapComboBox will inherit from wx.adv.OwnerDrawnComboBox. You can determine if the implementation is generic by checking whether GENERIC_BITMAPCOMBOBOX is defined. Currently wx.adv.BitmapComboBox is implemented natively for MSW and GTK+.

Todo

create CB_PROCESS_ENTER rather than reusing wx.TE_PROCESS_ENTER!


class_hierarchy Class Hierarchy

Inheritance diagram for class BitmapComboBox:

appearance Control Appearance


wxMSW

wxMSW

wxMAC

wxMAC

wxGTK

wxGTK


method_summary Methods Summary

__init__

Default constructor.

Append

Adds the item to the end of the combo box.

Create

Creates the combobox for two-step construction.

Dismiss

Hides the list box portion of the combo box.

FindString

Finds an item whose label matches the given string.

GetBitmapSize

Returns the size of the bitmaps used in the combo box.

GetClassDefaultAttributes

GetCount

Returns the number of items in the control.

GetInsertionPoint

Same as wx.TextEntry.GetInsertionPoint .

GetItemBitmap

Returns the bitmap of the item with the given index.

GetSelection

Returns the index of the selected item or NOT_FOUND if no item is selected.

GetTextSelection

Gets the current selection span.

GetString

Returns the label of the item with the given index.

Insert

Inserts the item into the list before pos.

IsListEmpty

Returns True if the list of combobox choices is empty.

IsTextEmpty

Returns True if the text of the combobox is empty.

Popup

Shows the list box portion of the combo box.

SetItemBitmap

Sets the bitmap for the given item.

SetSelection

Same as wx.TextEntry.SetSelection .

SetString

Changes the text of the specified combobox item.

SetTextSelection

Same as wx.TextEntry.SetSelection .

SetValue

Sets the text for the combobox text field.


property_summary Properties Summary

BitmapSize

See GetBitmapSize

Count

See GetCount

InsertionPoint

See GetInsertionPoint

Selection

See GetSelection and SetSelection


api Class API

class wx.adv.BitmapComboBox(Control, TextEntry, ItemContainer)

Possible constructors:

BitmapComboBox() -> None

BitmapComboBox(parent, id=ID_ANY, value='', pos=DefaultPosition,
               size=DefaultSize, choices=[], style=0, validator=DefaultValidator,
               name=BitmapComboBoxNameStr) -> None

A combobox that displays bitmap in front of the list items.


Methods

__init__(self, *args, **kw)

overload Overloaded Implementations:



__init__ (self)

Default constructor.

Return type:

None