Any way to open a main menubar menu by macro?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
JeJe
Volunteer
Posts: 2779
Joined: Wed Mar 09, 2016 2:40 pm

Any way to open a main menubar menu by macro?

Post by JeJe »

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

Code: Select all

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.)
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply