[Solved] Howto position a form

Creating and using forms
Post Reply
ruudhabets
Posts: 3
Joined: Sat Dec 08, 2007 8:25 pm

[Solved] Howto position a form

Post by ruudhabets »

Hi,
I am trying to position a from using macros, but I cannot find any specs on form properties.
I can resize a form using:

thisComponent.currentController.Frame.ContainerWindow.setPosSize(intXPos, intYPos, intWidth, intHeight, 15)

But positioning doesn't seem to work.

Any help is appreciated :bravo:
ruud
Last edited by Hagar Delest on Mon Jul 09, 2018 10:35 pm, edited 1 time in total.
Reason: tagged [Solved].
UnklDonald418
Volunteer
Posts: 1544
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: howto position a form

Post by UnklDonald418 »

Your code works for me.
What values are you using for intXPos and intYPos ?
Are you using Tools>Macros>Run Macro to run the macro?
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
ruudhabets
Posts: 3
Joined: Sat Dec 08, 2007 8:25 pm

Re: howto position a form

Post by ruudhabets »

I am using pixels although I have read elsewere I should be using thousands of cm. In any case I should see something....
The repositioning is called from a Sub after opening the form
When I reposition from a button on the form only intXpos seems to react. intYpos seems to default to zero.

Is there a reload / refresh call involved?

ruud

edit: I doubled the Y-pos and that works ?! (someting about saving macros and caches perhaps?)
Post Reply