Hello, I have a database whose forms have a clean interface; apart from the elements necessary for data entry, only the navigation bar is displayed and used for its very great utility, including the addition and deletion of records and the very complete LOBase search function.
I’m using a very well designed macro that I found on this site or maybe another site that I had to do very little to adapt to my needs.
However, I would like from this macro to be able to make the statusbar appear at the bottom of the form below the navigation bar. In fact, the only thing that interests me about this status bar is the zoom factor which on occasion can be very handy.
I tried to modify the conditional part of this macro in a different way using the “private:resource/$type/$name” syntax, but without success. I know that XLayoutManager.idl is essential to achieve the display of this one and that statusbar is one of the five elements or types defined. Not being a programmer, it is not easy to achieve a result with such complex functions.
See this link for details related to XLayoutManager: LibreOffice: XLayoutManager Interface Reference
So, can someone give me a solution so that the navigation bar and the was bar are both visible? Here is the procedure used:
Sub HideSomeMenuToolbars
   Dim oCurrentController as Object
   Dim oLayoutManager as Object
   Dim oElements as Object
   Dim oXUIElement As Object
   Dim iStart As Integer
   Dim iEnd As Integer
   Dim x As Integer
   Dim sResourceURL As String
   
' If Design mode, just exit the routine and display standard menu and toolbars
   oCurrentController = thisComponent.CurrentController
   If oCurrentController.isFormDesignMode Then
      ExitSub
   End If
   oLayoutManager = thisComponent.CurrentController.Frame.LayoutManager
'xLayoutManager.visible=false
   oElements = oLayoutManager.getElements()
   iStart = LBound(oElements)
   iEnd = UBound(oElements)
   For x = iStart to iEnd
      oXUIElement = oElements(x)
      sResourceURL = oXUIElement.ResourceURL
      If sResourceURL <> "private:resource/toolbar/formsnavigationbar" Then
          oLayoutManager.hideElement(sResourceURL)
      End If
   next
End Sub
Renel