[wxPython-users] wxGrid with custom editors, several question
Robin Dunn
robin at alldunn.com
Mon Sep 4 10:47:18 PDT 2006
Basil Shubin wrote:
> Robin Dunn wrote:
>> Basil Shubin wrote:
>>> Hi friends!
>>>
>>> Lets suppose I have wxGrid with table in it. This table have some
>>> kind of custom editors (choices).
>>>
>>> self.dataTypes = [gridlib.GRID_VALUE_CHOICE + titleChoices,
>>> gridlib.GRID_VALUE_CHOICE + setChoices,
>>> gridlib.GRID_VALUE_NUMBER + ':1,8',
>>> gridlib.GRID_VALUE_NUMBER + ':1,30',
>>> gridlib.GRID_VALUE_FLOAT + ':3,2',
>>> ]
>>>
>>> The 'titleChoices' compiled with data collected somewere else, point
>>> is that this data is not static, it's update through time. So the
>>> first question is: how can I update the 'titleChoice' dynamically
>>> when achieve some condition?
>>
>> You can catch the EVT_GRID_EDITOR_SHOWN event, get the combobox with
>> event.GetControl and modify the contents of the list at that point in
>> time.
>
> I got following error:
>
> AttributeError: 'GridEvent' object has no attribute 'GetControl'
>
> So how I can take the appropriate combo box control. And when I able to
> get it, how can I determine that it is a right control?
Sorry, I should have written EVT_GRID_EDITOR_CREATED.
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!
More information about the wxpython-users
mailing list