wxEVT_MOVE_END equivalent for GTK 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.
Post Reply
Maeglix
Experienced Solver
Experienced Solver
Posts: 74
Joined: Thu Nov 17, 2016 8:07 am

wxEVT_MOVE_END equivalent for GTK

Post by Maeglix » Wed Jun 19, 2019 1:49 pm

Hello every one,

In my app, i need to update a list (wxListCtrl) when the main app window is re-sized (either when the user re-sizes it manually or with the maximize / minimize button). The thing is I don't need and don't want to update it for each pixel of the re-size, so I can't just catch the size event. I would like to update it when the user finishes the re-size. I saw the wxEVT_MOVE_EVT which seemed to be what I need, but it is implemented only on MSW. So I would like to know if there is some equivalent of it on GTK or if there was a way to do it myself.

Thanks for your help.

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

Re: wxEVT_MOVE_END equivalent for GTK

Post by doublemax » Wed Jun 19, 2019 3:01 pm

I would catch the wxEVT_SIZE event and start a one-shot timer with about 200-400ms delay in the event handler. As long as the user is resizing, the timer will be restarted and not fire. In the timer event handler do the time consuming update.
Use the source, Luke!

Maeglix
Experienced Solver
Experienced Solver
Posts: 74
Joined: Thu Nov 17, 2016 8:07 am

Re: wxEVT_MOVE_END equivalent for GTK

Post by Maeglix » Fri Jun 21, 2019 6:28 am

Thanks ! It worked.

Mick P.
Earned some good credits
Earned some good credits
Posts: 113
Joined: Thu Jun 06, 2019 3:41 am
Contact:

Re: wxEVT_MOVE_END equivalent for GTK

Post by Mick P. » Sat Jun 22, 2019 9:50 pm

I think it sends wxEVT_MOVE only after the window is released from moving? It certainly looks that way, but it may depend on if the session is remote or other factors. I'm curious to know if that's the case.

Post Reply