[wxPython-users] wxGrid with custom editors, several question
Basil Shubin
bashu at yandex.ru
Wed Sep 6 07:44:28 PDT 2006
Robin Dunn wrote:
> Basil Shubin wrote:
>> Robin Dunn wrote:
>>> Basil Shubin wrote:
>>>> Robin Dunn wrote:
>
>>>>> 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.
>>
>> How sad! :-( Currently I develope my own free software project 'The
>> Diary of Hercules' (http://sourceforge.net/projects/hercules).
>>
>> In my application I have wxNotebook widget with two tabs. On the one
>> tab I can add new entry or edit exists one, on the other tab I have a
>> grid widget with custom grid editors in this grid. I need somehow
>> solve the following task: if I add or edit the entry at one time than
>> this entries should be available at once in the in-grob combo box so I
>> can select it. For this moment I can create choices list for combo box
>> only at startup and than unable to update it.
>>
>> So I understand there NO way to accomplish this task? Or maybe there
>> is some workaround way to solve my problem? Any suggestion?
>
> What I meant is that what I said above about EVT_GRID_EDITOR_SHOWN
> should work if you use EVT_GRID_EDITOR_CREATED instead.
Greate! I know now how to catch appropriate event. Next problem, how I
can determine which ComboBox I got with GetControl method, because I
have several combox boxes on each row. So which ComboxBox belongs to
which column?
Thanks for your help, Robin! You are a great man! :-)
More information about the wxpython-users
mailing list