editable_listbox
A Python implementation of wx.EditableListBox, a ListBox with editable items.
Available in two flavours:
Vanilla, that accepts any string value; and
- Numerical, that only accepts numerical values.
Those could be str, int, float or decimal.Decimal, but decimal.Decimal is used internally and is the type that will be returned.
Classes:
|
list control with auto-resizable column: |
|
This class provides a composite control that lets the user easily enter and edit a list of strings. |
|
|
-
class
CleverListCtrl
(parent, id=-1, pos=(-1, -1), size=(-1, -1), style=4, validator=<wx.Validator object>, name=b'listCtrl')[source] Bases:
ListCtrl
list control with auto-resizable column:
- Parameters
Methods:
OnSize
(event)- param event
The wxPython event.
-
class
EditableListBox
(parent, id=- 1, label='', pos=(- 1, - 1), size=(- 1, - 1), style=1792, name=b'editableListBox')[source] Bases:
Panel
This class provides a composite control that lets the user easily enter and edit a list of strings.
Styles supported:
wx.adv.EL_ALLOW_NEW
- Allow user to create new items.wx.adv.EL_ALLOW_EDIT
- Allow user to edit text in the control.wx.adv.EL_ALLOW_DELETE
- Allow user to delete text from the control.
- Parameters
Methods:
Retrieves a reference to the BitmapButton that is used as the ‘delete’ button in the control.
Retrieves a reference to the BitmapButton that is used as the ‘down’ button in the control.
Retrieves a reference to the BitmapButton that is used as the ‘edit’ button in the control.
Returns a reference to the actual list control portion of the custom control.
Retrieves a reference to the BitmapButton that is used as the ‘new’ button in the control.
Returns a list of the current contents of the control.
Retrieves a reference to the BitmapButton that is used as the ‘up’ button in the control.
OnBeginLabelEdit
(event)- param event
The wxPython event.
OnDelItem
(_)OnDownItem
(_)OnEditItem
(_)OnEndLabelEdit
(event)- param event
The wxPython event.
OnItemActivated
(evt)OnItemSelected
(event)OnNewItem
(event)- param event
The wxPython event.
OnUpItem
(_)SetStrings
(strings)Replaces current contents with given strings.
SwapItems
(i1, i2)- type i1
on_value_changed
(event)-
GetDelButton
()[source] Retrieves a reference to the BitmapButton that is used as the ‘delete’ button in the control.
-
GetDownButton
()[source] Retrieves a reference to the BitmapButton that is used as the ‘down’ button in the control.
-
GetEditButton
()[source] Retrieves a reference to the BitmapButton that is used as the ‘edit’ button in the control.
-
GetListCtrl
()[source] Returns a reference to the actual list control portion of the custom control.
- Returns
- Return type
-
GetNewButton
()[source] Retrieves a reference to the BitmapButton that is used as the ‘new’ button in the control.
-
GetStrings
()[source] Returns a list of the current contents of the control.
- Returns
list of strings
- Return type
list of str
-
GetUpButton
()[source] Retrieves a reference to the BitmapButton that is used as the ‘up’ button in the control.
-
class
EditableNumericalListBox
(parent, id=- 1, label='', decimal_places=- 1, pos=(- 1, - 1), size=(- 1, - 1), style=1792, name=b'editableListBox')[source] Bases:
EditableListBox
- Parameters
Methods:
Returns a list of the current contents of the control.
Returns a list of the current contents of the control.
SetDecimalPlaces
(_decimal_places)SetStrings
(strings)Replaces current contents with given strings.
SetValues
(values)Replaces current contents with given values.
on_value_changed
(event)Attributes:
-
GetStrings
()[source] Returns a list of the current contents of the control.
- Returns
list of strings
- Return type
list of str
-
SetStrings
(strings)[source] Replaces current contents with given strings.
- Parameters
strings – list of strings.
-
property
decimal_places