开发者

How to place a combobox in wxgrid (python)?

I can't find any good information on how to place a combobox inside a cell in a wxgrid. I tried Google, but m开发者_开发问答aybe I'm blind. Anyone have a simple sample to share?


Take a look at GridChoiceCellEditor. You can use it as follows:

    choice_editor = wx.grid.GridCellChoiceEditor(choices_list, True) 
    grid.SetCellEditor(row, col, choice_editor)


The wxPython demo has an example that shows how this is done in the GridStdEdRend.py file itself or from within the demo itself, see the "Editors and Renderers Demo" part of the grid demo. What you're looking for is the GridCellChoiceEditor. See also: http://wiki.wxpython.org/GridCellChoiceEditor

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜