Phoenix Logo

phoenix_title wx.grid.GridCellChoiceEditor

Grid cell editor for string data providing the user a choice from a list of strings.


class_hierarchy Class Hierarchy

Inheritance diagram for class GridCellChoiceEditor:

method_summary Methods Summary

__init__ Choice cell renderer constructor.
EndEdit End editing the cell.
SetParameters Parameters string format is “item1[,item2[...,itemN]]”.

api Class API



class wx.grid.GridCellChoiceEditor(GridCellEditor)

Possible constructors:

GridCellChoiceEditor(choices, allowOthers=False)

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.


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.



SetParameters(self, params)

Parameters string format is “item1[,item2[...,itemN]]”.

Parameters:params (string) –