Hi,
I've seen that the new wxAuiToolBar can show a dropdown popup menu with overflow items (this is a great feature !).
But controls can’t be shown in the menu.
I would like to make this work but I don’t know what would be the best solution to deal with this :
- try to add the “AppendControl” feature to wxMenu (difficult ?)
- use a custom dialog instead of the popup menu ?
Could you give me your opinion on this ?
Thanks
Kirix Support Forums
wxAuiToolBar and controls
2 posts
• Page 1 of 1
Re: wxAuiToolBar and controls
Hello,
The best way to do this is to create a class derived from wxPopupTransientWindow and put your control in this window. The wxPopupTransientWindow operates very similarly to a menu in that it is dismissed (hidden) for you when it loses the focus (once the user clicks outside its client area).
Create an instance of this popup window in the EVT_AUITOOLBAR_OVERFLOW_CLICK event handler and call Popup() on it in order to show the popup window when the user clicks the overflow button. If you need to explicitly hide the window, you can call Dismiss().
You'll need to include <wx/popupwin.h> in order to use the wxPopupTransientWindow class.
Hope this helps.
All the best,
Dave.
The best way to do this is to create a class derived from wxPopupTransientWindow and put your control in this window. The wxPopupTransientWindow operates very similarly to a menu in that it is dismissed (hidden) for you when it loses the focus (once the user clicks outside its client area).
Create an instance of this popup window in the EVT_AUITOOLBAR_OVERFLOW_CLICK event handler and call Popup() on it in order to show the popup window when the user clicks the overflow button. If you need to explicitly hide the window, you can call Dismiss().
You'll need to include <wx/popupwin.h> in order to use the wxPopupTransientWindow class.
Hope this helps.
All the best,
Dave.
Dave Williams
Kirix Support Team
Kirix Support Team
-
Dave - Kirix Support Team
- Posts: 32
- Joined: Wed Sep 21, 2005 11:07 pm
2 posts
· Page 1 of 1
Return to wxAUI Patches & Modifications