When does wxNotebook::GetSelection return wxNOT_FOUND?

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.
Post Reply
sparhawk
Experienced Solver
Experienced Solver
Posts: 81
Joined: Tue May 21, 2013 8:08 am

When does wxNotebook::GetSelection return wxNOT_FOUND?

Post by sparhawk »

According to the documentation wxNotebook::GetSelection() returns wxNOT_FOUND if no page is selected.

So my question is: Can this happen when the notebook has pages or does this only happen when there are no pages in the notebook?
I thought that, if there is at least one page, it will always have a selection. Or can you unselect the active page, so that a notebook can have pages but none of them are selected? I would think that the one, which is currently shown, is always considered to be selected and you can not show nothing, unless the notebook is empty.
Post Reply