wxNotebook - GetSelection issue Topic is solved
wxNotebook - GetSelection issue
Hi all,
I have been trying to add a feature similar to whats in firefox. middle mouse button closing the page.
But the problem is GetSelection always gives the visible page regardless of what page i click on.
for example
Page1 | Page2 | Page3
If 'Page3' is currently selected, even if i middle click on 'Page1', 'Page3' is closed.
And the documentation also tells that GetSelection always gives the previous one. Is there a workaround for this. or has anyone tried this on wxNotebook.
thanks in advance
deez
I have been trying to add a feature similar to whats in firefox. middle mouse button closing the page.
But the problem is GetSelection always gives the visible page regardless of what page i click on.
for example
Page1 | Page2 | Page3
If 'Page3' is currently selected, even if i middle click on 'Page1', 'Page3' is closed.
And the documentation also tells that GetSelection always gives the previous one. Is there a workaround for this. or has anyone tried this on wxNotebook.
thanks in advance
deez
Maybe you could have a look at the wxNotebook::HitTest function
wxwidgets wrote: wxNotebook::HitTest
int HitTest(const wxPoint& pt, long *flags = NULL)
Returns the index of the tab at the specified position or wxNOT_FOUND if none. If flags parameter is non NULL, the position of the point inside the tab is returned as well.
NB: This method is currently only implemented under wxMSW and wxUniv.