Ask Your Question

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

asked 2015-05-22 18:47:18 +0200

jay Arr gravatar image

updated 2015-08-26 21:29:44 +0200

Alex Kemp gravatar image

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?

edit retag flag offensive close merge delete


Confirmed with on Window$ 7 Ultimate SP1 x64.

rautamiekka gravatar imagerautamiekka ( 2015-05-22 19:32:11 +0200 )edit

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

doug gravatar imagedoug ( 2015-05-23 04:07:02 +0200 )edit

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.

doug gravatar imagedoug ( 2015-07-01 05:07:19 +0200 )edit

3 Answers

Sort by » oldest newest most voted

answered 2018-10-20 18:09:36 +0200

TerryHarris584 gravatar image

updated 2018-10-20 18:11:44 +0200

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 :)

edit flag offensive delete link more


@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.

Ratslinger gravatar imageRatslinger ( 2018-10-20 18:33:12 +0200 )edit

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?.

Ratslinger gravatar imageRatslinger ( 2018-10-20 18:34:01 +0200 )edit

Thanks for the link to the "form's exact size" macro. :)

TerryHarris584 gravatar imageTerryHarris584 ( 2018-10-20 20:02:11 +0200 )edit

answered 2015-05-22 20:07:55 +0200

pierre-yves samyn gravatar image


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


edit flag offensive delete link more


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

TonyG gravatar imageTonyG ( 2018-06-06 07:17:47 +0200 )edit

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.

TonyG gravatar imageTonyG ( 2018-06-15 14:48:22 +0200 )edit

answered 2015-05-23 11:29:52 +0200

jay Arr gravatar image

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").

edit flag offensive delete link more


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

jay Arr gravatar imagejay Arr ( 2015-05-23 17:19:58 +0200 )edit
Login/Signup to Answer

Question Tools



Asked: 2015-05-22 18:47:18 +0200

Seen: 1,674 times

Last updated: Oct 20 '18