In Base - how to fix a form's size?

Using LO with OSX 10.10.3

I have designed my form and now i want it to ALWAYS open with fixed size.

It never does. It is NEVER consistent ?!?!

Sometimes it’s one size then another
even when I open it the same way either by a macro call or with the editor.

Can iI do this without resorting to a macro or must I always do it with code?
And why does this behaviour happen?

Confirmed with on Window$ 7 Ultimate SP1 x64.

in edit mode, try switching to print mode and then define the page dimensions under menu item formatpagepage. I occasionally encountered similar errors when opening two forms at once, I assumed from an interference between the form properties.

I think this also is affected by what toolbars you display when you are in edit mode. The visible area within the toolbars sometimes is accounted-for, sometimes not.


What works in my environment (windows 7/64 &

  1. Right click the form then Edit
  2. Resize as you wish
  3. Display the “Forms Controls” toolbar if not
  4. In this toolbar click Design Mode On/Off to quit the design mode
  5. File> Save (Ctrl+S), close

The form should open by keeping its size


The size of Form-1 is not remembered after opening Form-2. Using LO on FC27.

Worse in LO The window opens taller than the desktop. Have to resize just to get to the record navigation toolbar. Doesn’t happen with plain Writer docs. Just Base forms.

Nope, neither of these two methods work when you (repeatedly) open two forms in succession each of which has different sizes. It seems using (LO with OSX 10.10.3) that LO opens the second form with the size of the first.

I think this might be bug - perhaps related to form/screen handling on a retina system.

Seems as though I’m going to have to rely on a macro to ensure that all my forms open as designed.

You might wonder why I’m doing this … well I have an application that announces itself with a splash form (sized 4" x 5") and the after completing all the preparatory activities closes the screen and opens a switchboard form (sized 8" x 4.5").

Can confirm that the multiple forms opening behaviour is as reported by Pierre on windows 7/64 & LO

I ran my unchanged application that I’m developing on my iMac, with Parallels (build 9.0.24251) on my laptop Macbook Pro (retina mid 2012) that’s running Windows 7 Professional with Service Pack 1

One way to fix a form’s size whenever it opens,
is to cause it to Open “Maximized”.

You can do this by using this Macro:

REM ===================================================

REM Maximize the Calling Window

Sub MaxWin
oCurrentController = ThisComponent.getCurrentController()

 oFrame = oCurrentController.getFrame()

 oContainerWindow = oFrame.getContainerWindow()

 oContainerWindow.isMaximized = True

End Sub

REM ===================================================

Once you save this Macro in your Database’s Standard Library,
you need to cause the Form to “call” this Macro on the
“When loading” event on the “Events” tab.

Here is how you do that:

  • Open the “.odb” file in LibreOffice Base.
  • Click on the Form Name.
  • Click on the “Edit” button at the top of the screen.
    This will open the Form in “Design Mode”.
  • Click on the “Form” button at the bottom of the screen.
    (Sometimes the bottom buttons are "off-the-screen.)
    This will open the “Form Properties” screen.
  • Click on the “Events” tab.
  • Click on the “…” button to the far-right of the “When loading” line.
    This brings up an “Assign Action” screen.
  • Click the “Macro” button in the upper-right.
  • Drill-down in the “Library” window until you see “MaxWin” Macro.
  • Click on that Macro.
  • Click on the next couple of “OK” buttons.
    The “When loading” line should have something like this in it:
    The Standard.myLibraryname.MaxWin (document, Basic)
  • Close the “Form Properties” screen.
  • Save the changes to your “.odb” file .

The next time you open that Form, it will automatically be Maximized!

TerryHarris584 :slight_smile:

@TerryHarris584 The original poster was looking for a method to do this without code. Since v4.4.x (in question) this has been addressed as to each form retaining its’ size. Alas, since then, a few new bugs have entered nullifying this.

While your method appears to work, most (myself included) prefer not to go full screen on every form. Although still using a macro there is a method to do this. Please see → Base: How to define a form’s exact size?.

Thanks for the link to the “form’s exact size” macro. :slight_smile: