Kirix Support Forums

Caption won't change when floating

Please post all general questions, comments, bug reports, and any other wxAUI feedback here.

Caption won't change when floating

Postby MrNiceGuy on Sun Nov 04, 2007 7:13 am

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)
MrNiceGuy
Registered User
 
Posts: 2
Joined: Sun Nov 04, 2007 7:03 am

Re: Caption won't change when floating

Postby Jes on Mon Nov 05, 2007 9:21 am

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

Return to wxAUI Questions, Thoughts & Feedback