Any way to open a main menubar menu by macro?

Creating a macro - Writing a Script - Using the API

Any way to open a main menubar menu by macro?

Postby JeJe » Fri Feb 09, 2018 1:04 am

I can create a full-screen-like view partly by hiding the menubar with this line of code

Code: Select all   Expand viewCollapse view
ThisComponent.CurrentController.Frame.LayoutManager.hideElement("private:resource/menubar/menubar")


... but then the menubar items can't be opened. Writer's normal full screen view has the same problem - the menubar is made not visible and can't be accessed.

Is there a way to open the menus... eg the file menu... by a macro and so access the menubar even when it is hidden?

(I know I can make the menu visible again with showElement. And there's a alternative approach of moving the top part of the window up a little so the menubar is hidden offscreen... not as neat though.)
Openoffice 4.1.2
Windows 8
JeJe
Volunteer
 
Posts: 461
Joined: Wed Mar 09, 2016 2:40 pm

Return to Macros and UNO API

Who is online

Users browsing this forum: No registered users and 4 guests