I wrote a wxPyGridCellEditor which calls a wxColourDialog in BeginEdit. When I close the editor the cell is still in "EditMode" showing the RGB-color-values and you have to press Enter (or click somewhere else in the App) to end the editing. So here is my question: Can I somehow end the editing automatically in a way that you don't have to press Enter?
And another question: Under Linux wxColourData().GetColourData() only returns the color selected with the RGB-sliders if you either select a predefined color or you add the color to the custom colors and select that color. Is this a bug or am I doing something wrong? Under Windows everything works fine.
I wrote a wxPyGridCellEditor which calls a wxColourDialog in BeginEdit. When I close the editor the cell is still in "EditMode" showing the RGB-color-values and you have to press Enter (or click somewhere else in the App) to end the editing. So here is my question: Can I somehow end the editing automatically in a way that you don't have to press Enter?
And another question: Under Linux wxColourData().GetColourData() only returns the color selected with the RGB-sliders if you either select a predefined color or you add the color to the custom colors and select that color. Is this a bug or am I doing something wrong? Under Windows everything works fine.
Works okay for me in the demo.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!
Robin Dunn wrote:
> Wolfram Kraus wrote:
>
>> Heyho!
>>
>> I wrote a wxPyGridCellEditor which calls a wxColourDialog in
>> BeginEdit. When I close the editor the cell is still in "EditMode"
>> showing the RGB-color-values and you have to press Enter (or click
>> somewhere else in the App) to end the editing. So here is my
>> question: Can I somehow end the editing automatically in a way that
>> you don't have to press Enter?
>
> Try this: wxCallAfter(grid.DisableCellEditControl)
Thanks! Works excellent!
>> And another question: Under Linux wxColourData().GetColourData() only
>> returns the color selected with the RGB-sliders if you either select
>> a predefined color or you add the color to the custom colors and
>> select that color. Is this a bug or am I doing something wrong? Under
>> Windows everything works fine.
>>
>
> Works okay for me in the demo.
Neither my own code nor the demo works for me (Mandrake Linux 8.2 (I know, this is very old), wxPy 2.4.0.6 (rpm), Python 2.2). The demo-log states 'You selected: (0, 0, 0)'. That is the selected predefined black.