If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
rocrail
Super wx Problem Solver
Posts: 299 Joined: Fri Oct 02, 2009 2:02 pm
Post
by rocrail » Thu Feb 07, 2019 10:52 am
Hi,
I'm using the AUI functions in my program.
The documentation states:
wxAuiPaneInfo& wxAuiPaneInfo::CaptionVisible ( bool visible = true )
CaptionVisible indicates that a pane caption should be visible.
If false, no pane caption is drawn.
But even if I Update the AUIManger after altering the PaneInfo, this Flag does not seem to show or hide the caption.
Code snippet:
Code: Select all
wxAuiPaneInfo paneinfo = m_AuiManager.GetPane(p);
if( paneinfo.IsOk() ) {
paneinfo.CaptionVisible(show);
m_AuiManager.Update();
}
Any tips are highly appreciated.
doublemax
Moderator
Posts: 19164 Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2
Post
by doublemax » Thu Feb 07, 2019 11:20 am
Code: Select all
wxAuiPaneInfo paneinfo = m_AuiManager.GetPane(p);
You're creating (and modifying) a copy of the paneinfo.
Use the reference:
Code: Select all
wxAuiPaneInfo &paneinfo = m_AuiManager.GetPane(p);
Use the source, Luke!
rocrail
Super wx Problem Solver
Posts: 299 Joined: Fri Oct 02, 2009 2:02 pm
Post
by rocrail » Thu Feb 07, 2019 11:37 am
Hi,
OK, I corrected this, but no result either.
If I set this captionvisible flag to false on pane add, the caption is also showed...
doublemax
Moderator
Posts: 19164 Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2
Post
by doublemax » Thu Feb 07, 2019 1:33 pm
I tested this in the aui sample and it worked. When and in what context do you call it?
Use the source, Luke!
rocrail
Super wx Problem Solver
Posts: 299 Joined: Fri Oct 02, 2009 2:02 pm
Post
by rocrail » Thu Feb 07, 2019 1:37 pm
Oh?
I will check the example first, and will report.
rocrail
Super wx Problem Solver
Posts: 299 Joined: Fri Oct 02, 2009 2:02 pm
Post
by rocrail » Thu Feb 07, 2019 1:49 pm
Under macOS the caption options does do nothing; All captions remain horizontal and visible...
rocrail
Super wx Problem Solver
Posts: 299 Joined: Fri Oct 02, 2009 2:02 pm
Post
by rocrail » Thu Feb 07, 2019 3:11 pm
Just for the record: I presume that Caption == Titlebar?
doublemax
Moderator
Posts: 19164 Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2
Post
by doublemax » Thu Feb 07, 2019 5:22 pm
I added this to MyFrame::OnAbout() in the aui sample:
Code: Select all
wxAuiPaneInfo &info = m_mgr.GetPane(wxT("test8"));
info.CaptionVisible( false );
m_mgr.Update();
Just for the record: It only works with docked panes. If you'd remove the caption from a floating pane, you wouldn't be able to move it.
Use the source, Luke!
rocrail
Super wx Problem Solver
Posts: 299 Joined: Fri Oct 02, 2009 2:02 pm
Post
by rocrail » Thu Feb 07, 2019 5:32 pm
It only works with docked panes.
OK, I noticed this by experimenting with the AUI sample.
But most of my panes are floating.
The idea was to hide the captions if all panes are in the wanted position.
The floating panes are wxMiniFrames? Could the title bar be hidden with those frames?
doublemax
Moderator
Posts: 19164 Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2
Post
by doublemax » Thu Feb 07, 2019 5:34 pm
The floating panes are wxMiniFrames?
I don't think so. I think wxAUI is 100% custom drawn.
Use the source, Luke!