wxAuiNotebook::OnLeftUp not working Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
wxwxwx
I live to help wx-kind
I live to help wx-kind
Posts: 179
Joined: Thu Dec 20, 2012 4:25 pm

Re: wxAuiNotebook::OnLeftUp not working

Post by wxwxwx » Sun Apr 18, 2021 5:55 pm

I mean, i like to start just with one and only one page.
This page is intended a "add a page" page ("+" page).

I checked the changing event and it does not work, when you just have one page.
Most likely, because nothing can change.

Your code works, yes, i know. Once i have 2 or more pages, i get this event.
But not with just one page.

Do you know how i mean ?
Thank you

wxwxwx
I live to help wx-kind
I live to help wx-kind
Posts: 179
Joined: Thu Dec 20, 2012 4:25 pm

Re: wxAuiNotebook::OnLeftUp not working

Post by wxwxwx » Sun Apr 18, 2021 5:59 pm

ONEEYEMAN wrote:
Sun Apr 18, 2021 4:54 pm
Hi,
Did you try it?
And we still wants to see your reproducer...

Thank you.
I checked out the

Code: Select all

wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING
event.
It is not working, when you have just one page.

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

Re: wxAuiNotebook::OnLeftUp not working

Post by ONEEYEMAN » Sun Apr 18, 2021 6:08 pm

Hi,
But did you actually run the code?

And as mentioned before - could you post your code from the minimal sample so we can see what is happenning?

Thank you.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3000
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxAuiNotebook::OnLeftUp not working

Post by PB » Sun Apr 18, 2021 6:20 pm

wxwxwx wrote:
Sun Apr 18, 2021 5:59 pm
I checked out the

Code: Select all

wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING
event.
It is not working, when you have just one page.
This is not true, at least with wxWidgets 3.1.5 on MS Windows. When I comment out this line

Code: Select all

//m_notebook->AddPage(new wxPanel(m_notebook), "Page 1", true);
i.e., m_notebook has just one page (the "Add Page"), my code still works.

wxwxwx
I live to help wx-kind
I live to help wx-kind
Posts: 179
Joined: Thu Dec 20, 2012 4:25 pm

Re: wxAuiNotebook::OnLeftUp not working

Post by wxwxwx » Sun Apr 18, 2021 6:27 pm

So far i did not run your code, because have a linker problem.
My vcpkg wx version is 3.14.

But i checked this in my implmentation and event

Code: Select all

wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING
did not work with one page.

PB
Part Of The Furniture
Part Of The Furniture
Posts: 3000
Joined: Sun Jan 03, 2010 5:45 pm

Re: wxAuiNotebook::OnLeftUp not working

Post by PB » Sun Apr 18, 2021 6:30 pm

I just checked and it works with one page even with wxWidgets 3.0.5. The only change needed with this old version was to uninitialize wxAuiManager manually.

I do not understand how can you have issues with linking with my example code, as it cannot use anything else than your code does? Even if you are incapable of creating a test wxWidgets project, you should be able to just copy and paste those 30 lines of MyFrame code to your application and create an instance of MyFrame there.

If it does not work in your code, you must be doing something differently than in my code but I obviously cannot tell what it is.

wxwxwx
I live to help wx-kind
I live to help wx-kind
Posts: 179
Joined: Thu Dec 20, 2012 4:25 pm

Re: wxAuiNotebook::OnLeftUp not working

Post by wxwxwx » Sun Apr 18, 2021 6:32 pm

ONEEYEMAN wrote:
Sun Apr 18, 2021 6:08 pm
Hi,
But did you actually run the code?

And as mentioned before - could you post your code from the minimal sample so we can see what is happenning?

Thank you.
Hm, could link now and run code with just one page and the

Code: Select all

wxEVT_AUINOTEBOOK_PAGE_CHANGING
works.

Ok, thank you. Need to figure out the differences.

Post Reply