GridCellChoiceEditor
Mark Erbaugh
mark at microenh.com
Tue Feb 5 14:24:24 PST 2008
Is is possible to change the values in the drop down list of a
GridCellChoiceEditor on the fly?
I have two columns in a grid. In the first column, the user selects the
category (via a GridCellChoiceEditor), in the second column, they need
to select an item within the selected category.
I tried using the Editor's SetParameters method in the select cell event
handler when the user selects the items column with interesting
results. It seems like only the SetParameters calls made the first time
the event handler is called are effective. The C++ code shows that
SetParameters calls reset the parameters to the new values. In fact, if
I call SetParameters twice in the event handler, the values in the drop
down list are from the last call.
However, SetParameters calls in subsequent calls the the event handler
(which I verified are being invoked with print statements) are not
showing up in the drop down list.
My guess is that the actual control is created before the first time it
drops down, using the values from the most recent SetParameters call.
Once the control is created, changes to SetParameters don't refresh the
values in the control.
Mark
More information about the wxpython-users
mailing list