Running LO 6.4.7 on Linux Mint 20. Have an older app that will automatically remove all Design Toolbars and leave just the Menu Bar. This is done with a Macro. Every one of the 6 Forms in that app run the Macro on open, however there is no reference to the Macro in any Form Events. This is making me crazy after wasting several hours looking for an event that auto launches the Macro and can’t find any. There is a Macro to load the Menu Form set in Open Document.
I have created a new app and it is using the same Macros. I can auto launch the Menu app in Open Document, but the Macro to remove the toolbars after Form open never launches using any Form Events.
Macro to Hide:
Sub HideAllMenuToolbars
’ If Design mode, just exit the routine and display standard menu and toolbars’
xCurrentController = thisComponent.CurrentController
If xCurrentController.isFormDesignMode Then
Exit Sub
End If
xLayoutManager = thisComponent.CurrentController.Frame.LayoutManager
xLayoutManager.visible = false
End Sub
Macros to Open Menu Form and Minimize LO Base Form:
Sub OpenFormMain
MinBaseWin
ThisDatabaseDocument.CurrentController.connect("","")
form_container = ThisDatabaseDocument.FormDocuments.getByName(“Main”).open
End Sub
Sub MinBaseWin
oController = ThisComponent.getCurrentController()
oFrame = oController.getFrame()
oContainerWindow = oFrame.ContainerWindow
oContainerWindow.isMinimized = True
End Sub
- How do I get a Form to Launch HideAllMenuToolbars after Load?
- Where could the old app be launching HideAllMenuToolbars on every Form Open/Load when I can’t find it referenced in any Form Events?
New app will be used by others for Data Entry so I need to have it looking somewhat polished.
Thanks for any insights or suggestions.