Ask Your Question
1

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

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

jay Arr gravatar image

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

Alex Kemp gravatar image

Using LO 4.4.3.2 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

Comments

Confirmed with 4.4.3.2 on Window$ 7 Ultimate SP1 x64.

rautamiekka gravatar imagerautamiekka ( 2015-05-22 19:32:11 +0100 )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 +0100 )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 +0100 )edit

3 Answers

Sort by » oldest newest most voted
0

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

TerryHarris584 gravatar image

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

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

Comments

@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 +0100 )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 +0100 )edit

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

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

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

pierre-yves samyn gravatar image

Hi

What works in my environment (windows 7/64 & 4.4.3.2):

  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

Regards

edit flag offensive delete link more

Comments

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

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

Worse in LO 6.0.4.2-2.fc28. 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 +0100 )edit
0

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

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 4.4.3.2 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

Comments

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

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 +0100 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

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

Seen: 1,484 times

Last updated: Oct 20