wx.grid.GridCellChoiceEditor¶
Grid cell editor for string data providing the user a choice from a list of strings.
See also
wx.grid.GridCellEditor, wx.grid.GridCellAutoWrapStringEditor, wx.grid.GridCellBoolEditor, wx.grid.GridCellEnumEditor, wx.grid.GridCellFloatEditor, wx.grid.GridCellNumberEditor, wx.grid.GridCellTextEditor, wx.grid.GridCellDateEditor
Class Hierarchy¶
Known Subclasses¶
Methods Summary¶
Choice cell renderer constructor. |
|
End editing the cell. |
|
Parameters string format is “item1[,item2[…,itemN]]”. |
Class API¶
- class wx.grid.GridCellChoiceEditor(GridCellEditor)¶
Possible constructors:
GridCellChoiceEditor(choices, allowOthers=False) -> None
Grid cell editor for string data providing the user a choice from a list of strings.
Methods¶
- __init__(self, choices, allowOthers=False)¶
Choice cell renderer constructor.
- Parameters:
choices (list of strings) – An array of strings from which the user can choose.
allowOthers (bool) – If allowOthers is
True
, the user can type a string not in choices array.
- Return type:
None
- EndEdit(self, row, col, grid, oldval)¶
End editing the cell.
This function must check if the current value of the editing cell is valid and different from the original value in its string form. If not then simply return None. If it has changed then this method should save the new value so that ApplyEdit can apply it later and the string representation of the new value should be returned.
Notice that this method shoiuld not modify the grid as the change could still be vetoed.
- Return type:
Any
- SetParameters(self, params)¶
Parameters string format is “item1[,item2[…,itemN]]”.
This method can be called before the editor is used for the first time, or later, in which case it replaces the previously specified strings with the new ones.
- Parameters:
params (string)
- Return type:
None