wxFlatNotebook: EVT_NOTEBOOK_PAGE_CHANGED/CHANGING? Topic is solved

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
Post Reply
benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

wxFlatNotebook: EVT_NOTEBOOK_PAGE_CHANGED/CHANGING?

Post by benedicte »

Hello,

We are trying to use wxFlatNotebook in our app, but on Windows, we noticed the EVT_NOTEBOOK_PAGE_CHANGED/CHANGING events are not raised at page insertion, as the wxNotebook does.

We would like to be able to switch between wxFlatNotebook and wxNotebook with a single preprocessor definition, so we need both controls to have the same behaviour.

Is it possible to make wxFlatNotebook raise these events on Windows?

Another question:
How to set the background colours for pages? as it is not the same colour as the one used for the notebook itself (at least on Windows).

Regards,
B
eranif
Moderator
Moderator
Posts: 610
Joined: Tue Nov 29, 2005 7:10 pm
Location: Israel

Post by eranif »

Hi,
benedicte wrote:We are trying to use wxFlatNotebook in our app, but on Windows, we noticed the EVT_NOTEBOOK_PAGE_CHANGED/CHANGING events are not raised at page insertion, as the wxNotebook does
I will look at it later tonight, and will probably will add it.
benedicte wrote:How to set the background colours for pages? as it is not the same colour as the one used for the notebook itself (at least on Windows)
When adding a page, simply set it background colour.
(the wxFlatNotebook control, is basically two controls sitting on a sizer: The active page & the tab drawing area)

Code: Select all

wxWindow *page = CreateDefaultPage();
page->SetBackgroundColour( wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
HTH
- Eran
IDE: CodeLite + wxCrafter
OS: All
https://wxcrafter.codelite.org
https://codelite.org
benedicte
wxWorld Domination!
wxWorld Domination!
Posts: 1409
Joined: Wed Jan 19, 2005 3:44 pm
Location: Paris, France

Post by benedicte »

Thanks Eran,

We also noticed a problem when using wxFlatNotebook built as a DLL.
The renderer singleton is not released because the variable is not shared between the DLL and the app. (it is initialized in the DLL, and not released)

We are going to submit a patch on SF to make a function exported so that the singleton in the DLL can be "free"d with a call in the app.

Regards,
B
Post Reply