Hello everyone,
Is ThisComponent.CurrentController.Frame.LayoutManager.HideCurrentUI a correct property to use when hiding, and then subsequently showing, the menu bar?
Thank you in advance for your suggestions.
Hello everyone,
Is ThisComponent.CurrentController.Frame.LayoutManager.HideCurrentUI a correct property to use when hiding, and then subsequently showing, the menu bar?
Thank you in advance for your suggestions.
My first tip: Try it.
My second tip: Download, install and use one of these excellent object inspection tools: XrayTool or MRI. Then you will able to list all of existing properties, methods and interfaces of the programming objects.
I did and i am using it. The problem is that it tends to get “sticky” when calling the bar back up.
Hello,
While I have posted code for hiding/revealing/modifying menu and toolbars, here is one simple toggle:
.
sub menuToggle
dim document as object
dim dispatcher as object
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
dispatcher.executeDispatch(document, ".uno:MenuBar", "", 0, Array())
End Sub
If menubar is showing, execute & it is hidden. Another execution will reveal.
Thank you Mr. Ratslinger!!
@marus_b,
You should search first. Try searching (magnifying glass icon in upper right) using Hide Menubar
. You will get this code in another answer I posted & a number of other solutions for menu and tool bars.