Layout in a scrolled window Topic is solved

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.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Layout in a scrolled window

Post by doublemax »

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.
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN »

doublemax,
Attached is the code with the set focus event handler.

Run it, click "Add" 3 times, then click on the first line edit control.

For me the focus is on the correct line, but the pointer points to the second line.

Thank you.
Attachments
retrievalarguments(1).h
(1.8 KiB) Downloaded 113 times
retrievalarguments(1).cpp
(14.77 KiB) Downloaded 94 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN »

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.

Thank you.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN »

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.

Could you check that please?

Thank you.
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Layout in a scrolled window

Post by doublemax »

Can you make the code compilable again, please?
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN »

doublemax,

Sorry about that.

Attached.

I hope Bryan will do smth about circling login soon... ;-)
Attachments
retrievalarguments.h
(1.85 KiB) Downloaded 92 times
retrievalarguments.cpp
(15.21 KiB) Downloaded 95 times
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN »

doublemax,
Did you delete a reply?

Thank you
User avatar
doublemax
Moderator
Moderator
Posts: 19114
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Layout in a scrolled window

Post by doublemax »

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)
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN »

doublemax,
Thank you.
Whenever you can..
Post Reply