Developer forums (C::B DEVELOPMENT STRICTLY!) > Development

wxauinotebook

(1/2) > >>

blueshake:
hi,I try to  implement such a function that when i double click the tab on the notebook,the tab  closed.so i need to hook the double click message on wxauinotebook ,but i just found  EVT_AUINOTEBOOK_BG_DCLICK
message .
so anyone has any comment on this?

Jenna:

--- Quote from: blueshake on August 21, 2009, 01:29:10 pm ---hi,I try to  implement such a function that when i double click the tab on the notebook,the tab  closed.so i need to hook the double click message on wxauinotebook ,but i just found  EVT_AUINOTEBOOK_BG_DCLICK
message .
so anyone has any comment on this?

--- End quote ---

If you look into the wxWidgets sources (stable and trunk) you see that it's just not implemented.And what's more it can not easily be changed, because the event is thrown by wxAuiTabCtrl's OnLeftDClick-event.

It's no problem to inherit a class from wxAuiNotebook, but to make it work you also need to derive a class from wxAuiTabCtrl and overwrite wxAuiNotebooks functions where the tabctrl get's created, but some of these functions also use wxTabFrame, but wxTabFrame is only declared in auibook.cpp, and therefore you can not use it in derived classes.

You can have a look into the wxWidgets bug-tracker, whether a bug-report exists about that issue, and if not you can post one.

blueshake:
thanks,jens.
so it seems impossible to implement this function in codeblock.what a pity. :(

TDragon:
Actually, you could just push a new wxEvtHandler on the tab control window object that intercepts the event first. See wxWindow::PushEventHandler.

Jenna:

--- Quote from: TDragon on August 21, 2009, 05:59:19 pm ---Actually, you could just push a new wxEvtHandler on the tab control window object that intercepts the event first. See wxWindow::PushEventHandler.

--- End quote ---

Thanks TDragon, didn't know this.
This might (hopefully) help a lot.

Navigation

[0] Message Index

[#] Next page

Go to full version