Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
ONEEYEMAN wrote: ↑Mon Jul 26, 2021 9:32 pm
In the key down event handler I set the focus to the next row and call event.Skip(), otherwise the handler won't work.
But then SetFocus() handler is executed and should set a focus to the 3rd row...
I don't quite understand that. Let's say the first line is "active" and you press "key down". Then you set focus to the first textcontrol of the 2nd line. The focus handler detects that, calculates the line and it should be the 2nd line. How does it get into the 3rd line?
Maybe you have to use CallAfter for the SetFocus() call.
doublemax,
On top of mouse events, tabbing works the same way - when I' on the first row and the focus is n the combo box, pressing TAB mves the focs as appropriate, but the bitmap cursor moves incorrectly.
doublemax,
You said that I can get rid of the muose event handler and se focus event.
Well I did just that and now I have very weird results.
See attached.
So, first when I add the lines the set focus handler is not called.
And then following scenario fails:
1. Start the dialog.
2. Add 3 lines.
3. Click on the text control in the very first (top) line.
4. Click on the second line text control.
At this point focus moves but the pointer (hand) will stay at one.
Almost as if the mouse click is not generate the focus event.
But if you click n the text control in 3rd line everything will work.
ONEEYEMAN wrote: ↑Sat Aug 07, 2021 7:27 pm
doublemax,
Did you delete a reply?
Yes i did. I still had to make a few changes, but i got it to compile and run in the end.
But i think this the code is in need of some refactoring, i'll try to do that tomorrow. (no promises)