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: 16374
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Layout in a scrolled window

Post by doublemax » Tue Jul 27, 2021 5:20 am

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: 5302
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN » Tue Jul 27, 2021 7:19 pm

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 36 times
retrievalarguments(1).cpp
(14.77 KiB) Downloaded 33 times

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5302
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN » Fri Jul 30, 2021 3:40 am

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: 5302
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN » Sat Aug 07, 2021 2:46 am

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: 16374
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Layout in a scrolled window

Post by doublemax » Sat Aug 07, 2021 6:54 am

Can you make the code compilable again, please?
Use the source, Luke!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5302
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN » Sat Aug 07, 2021 5:05 pm

doublemax,

Sorry about that.

Attached.

I hope Bryan will do smth about circling login soon... ;-)
Attachments
retrievalarguments.h
(1.85 KiB) Downloaded 19 times
retrievalarguments.cpp
(15.21 KiB) Downloaded 22 times

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 5302
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN » Sat Aug 07, 2021 7:27 pm

doublemax,
Did you delete a reply?

Thank you

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

Re: Layout in a scrolled window

Post by doublemax » Sat Aug 07, 2021 8:53 pm

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: 5302
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Layout in a scrolled window

Post by ONEEYEMAN » Sat Aug 07, 2021 10:02 pm

doublemax,
Thank you.
Whenever you can..

Post Reply