Hello,
it may be, that I am doing something wrong but this is, what I noticed:
To change the caption of a floating frame I have to do
wxAuiPaneInfo& pa=m_mgr->GetPane(this);
iif (pa.IsOk()) {
if (pa.IsFloating()) {
wxFrame *f=wxDynamicCast(GetParent(), wxFrame);
if (f) f->SetTitle(str);
}
m_mgr->GetPane(this).Caption(str);
m_mgr->Update();
}
so I think, when changing the caption SetTitle() of the surrounding frame is not called.
Only after docking and undocking the right caption is shown without setting the title manually.
Another thing:
Perhaps wxFULL_REPAINT_ON_RESIZE should be set or changeable.(I did not find it)
Kirix Support Forums
Caption won't change when floating
2 posts
• Page 1 of 1
- MrNiceGuy
- Registered User
- Posts: 2
- Joined: Sun Nov 04, 2007 7:03 am
Re: Caption won't change when floating
- Code: Select all
void MyFrame3::r333( wxCommandEvent& event ){
wxAuiPaneInfo &pane(m_mgr.GetPane(wxT("EPane1")));
pane.Caption(event.GetString()); //changing title of caption
if(pane.IsFloating()&&pane.window&&pane.window->GetParent())
pane.window->GetParent()->SetLabel(pane.caption); //refresh title of floating frame
m_mgr.Update();
this->SetTitle(event.GetString()); //changing title of main window
event.Skip();
}
it's worked code - event invoked from wxTextCtrl placed in same Pane
work with floated frame too
maybe need fix it in source code of wxAUI - Will do patch someone ?
Let improove it together
- Jes
- Registered User
- Posts: 15
- Joined: Mon Oct 15, 2007 10:27 am
2 posts
· Page 1 of 1
Return to wxAUI Questions, Thoughts & Feedback