Home | Trees | Index | Help |
|
---|
Package wx :: Module combo :: Class OwnerDrawnComboBox |
|
object
--+ |Object
--+ |EvtHandler
--+ |Window
--+ |Control
--+ |ComboCtrl
--+ |object
--+ | | |ItemContainer
--+ | OwnerDrawnComboBox
BitmapComboBox
wx.combo.OwnerDrawnComboBox is a combobox with owner-drawn list
items. In essence, it is a wx.combo.ComboCtrl
with a wx.VListBox
popup and a wx.ControlWithItems
API.
Implementing item drawing and measuring is similar to wx.VListBox.
The application needs to subclass wx.combo.OwnerDrawnComboBox and
implement the OnDrawItem
, OnMeasureItem
and OnMeasureItemWidth
methods.
Method Summary | |
---|---|
OwnerDrawnComboBox |
Standard constructor. |
bool |
Create the UI object, and other initialization. |
int |
Return the index of the widest item (recalculating it if necessary.) |
int |
Return the widest item width (recalculating it if necessary.) |
This method is used to draw the items background and, maybe, a border around it. | |
The derived class may implement this function to actually draw the item with the given index on the provided DC. | |
int |
The derived class may implement this method to return the height of the specified item (in pixels). |
int |
The derived class may implement this method to return the width of the specified item (in pixels). |
SetMark(self,
from,
to)
|
Property Summary | |
---|---|
thisown : The membership flag |
Class Variable Summary |
---|
Instance Method Details |
---|
__init__(self,
parent,
id=-1,
value=EmptyString,
pos=DefaultPosition,
size=DefaultSize,
choices=wxPyEmptyStringArray,
style=0,
validator=DefaultValidator,
name=wxPyComboBoxNameStr)
|
Create(self, parent, id=-1, value=EmptyString, pos=DefaultPosition, size=DefaultSize, choices=wxPyEmptyStringArray, style=0, validator=DefaultValidator, name=wxPyComboBoxNameStr)Create the UI object, and other initialization.
|
GetWidestItem(self)Return the index of the widest item (recalculating it if necessary.)
|
GetWidestItemWidth(self)Return the widest item width (recalculating it if necessary.)
|
OnDrawBackground(self, dc, rect, item, flags)This method is used to draw the items background and, maybe, a border around it. The base class version implements a reasonable default behaviour which
consists in drawing the selected item with the standard background
colour and drawing a border around the item if it is either selected
or current. flags has the sam meaning as with
|
OnDrawItem(self, dc, rect, item, flags)The derived class may implement this function to actually draw the item with the given index on the provided DC. If this method is not overridden, the item text is simply drawn as if the control was a normal combobox.
|
OnMeasureItem(self, item)The derived class may implement this method to return the height of the specified item (in pixels). The default implementation returns text height, as if this control was a normal combobox.
|
OnMeasureItemWidth(self, item)The derived class may implement this method to return the width of the specified item (in pixels). If -1 is returned, then the item text width is used. The default implementation returns -1.
|
Property Details |
---|
thisownThe membership flag
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.1.20050511.rpd on Thu Mar 22 12:08:41 2007 | http://epydoc.sf.net |