Hi,
#This program could achieve choice in Gridcell
import wx
import wx.grid
class Frame(wx.Frame):
def init(self, parent=None, id=-1, title=‘wx.grid.Grid’,
pos=wx.DefaultPosition,size=wx.DefaultSize,
style=wx.DEFAULT_FRAME_STYLE):
wx.Frame.init(self, parent, id, title, pos, size, style)
self.CreateStatusBar()
self.Grid = wx.grid.Grid(self, -1)
self.Grid.CreateGrid(2, 2)
Languages = [‘C’, ‘C++’, ‘Python’, ‘Java’, ‘Perl’, ‘Ruby’]
ChoiceEditor = wx.grid.GridCellChoiceEditor(Languages)
self.Grid.SetCellEditor(0, 0, ChoiceEditor)
def TestFrame():
app = wx.PySimpleApp()
frame = Frame(size=(300, 150))
frame.Centre()
frame.Show
()
app.MainLoop()
if name == ‘main’:
TestFrame()
···
####################################################
How to achieve ComboBox in GridCells?
Thanks.