AUI CaptionVisible does not seem to show any effect.

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.
Post Reply
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

AUI CaptionVisible does not seem to show any effect.

Post by rocrail »

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.
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: AUI CaptionVisible does not seem to show any effect.

Post by doublemax »

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!
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: AUI CaptionVisible does not seem to show any effect.

Post by rocrail »

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...
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: AUI CaptionVisible does not seem to show any effect.

Post by doublemax »

I tested this in the aui sample and it worked. When and in what context do you call it?
Use the source, Luke!
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: AUI CaptionVisible does not seem to show any effect.

Post by rocrail »

Oh?
I will check the example first, and will report.
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: AUI CaptionVisible does not seem to show any effect.

Post by rocrail »

Under macOS the caption options does do nothing; All captions remain horizontal and visible...
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: AUI CaptionVisible does not seem to show any effect.

Post by rocrail »

Just for the record: I presume that Caption == Titlebar?
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: AUI CaptionVisible does not seem to show any effect.

Post by doublemax »

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!
User avatar
rocrail
Super wx Problem Solver
Super wx Problem Solver
Posts: 299
Joined: Fri Oct 02, 2009 2:02 pm
Contact:

Re: AUI CaptionVisible does not seem to show any effect.

Post by rocrail »

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?
Best regards,
Rob.
https://wiki.rocrail.net
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: AUI CaptionVisible does not seem to show any effect.

Post by doublemax »

The floating panes are wxMiniFrames?
I don't think so. I think wxAUI is 100% custom drawn.
Use the source, Luke!
Post Reply