Is it possible to create a tab (a wxAuiMDIChildFrame derived window) in the background? i.e. not have it steal focus from the currently selected tab?
Is it also possible to remove a tab without stealing focus first?
Kirix Support Forums
Creating a background tab
3 posts
• Page 1 of 1
Hello disasm,
Yes, as of a few hours ago .
Just create your child frame with the wxMINIMIZE style. Using this flag makes sense because an inactive tab is really the equivalent of a minimized window.
By the way, this is a good way to really reduce flicker when you create a new tab child-- first create it with wxMINIMIZE, and then call wxAuiMDICildFrame::Activate() to show it once all child windows are positioned correctly.
The other way to do the same thing without wxMINIMIZE is to call wxAuiMDIChildFrame::Show(false) before calling Create(). This is also standard in wxWidgets as of a few months ago.
Let me know if this works for you.
Best,
Ben
Yes, as of a few hours ago .
Just create your child frame with the wxMINIMIZE style. Using this flag makes sense because an inactive tab is really the equivalent of a minimized window.
By the way, this is a good way to really reduce flicker when you create a new tab child-- first create it with wxMINIMIZE, and then call wxAuiMDICildFrame::Activate() to show it once all child windows are positioned correctly.
The other way to do the same thing without wxMINIMIZE is to call wxAuiMDIChildFrame::Show(false) before calling Create(). This is also standard in wxWidgets as of a few months ago.
Let me know if this works for you.
Best,
Ben
-
Ben - Kirix Support Team
- Posts: 525
- Joined: Mon Dec 19, 2005 6:29 am
This works great when creating a new tab in the background! Thanks!
However, it does nothing for the problem of a tab stealing focus when closing. But I have found that if I call pChildFrame->DoShow(false) before calling pChildFrame->Close() then the tab does not steal the focus (and repaint itself) right before being closed.
However, it does nothing for the problem of a tab stealing focus when closing. But I have found that if I call pChildFrame->DoShow(false) before calling pChildFrame->Close() then the tab does not steal the focus (and repaint itself) right before being closed.
- disasm
- Registered User
- Posts: 16
- Joined: Tue Jan 10, 2006 8:56 pm
3 posts
· Page 1 of 1
Return to wxAUI Questions, Thoughts & Feedback