[Solved] Howto position a form

Creating and using forms

[Solved] Howto position a form

Postby ruudhabets » Mon Jul 09, 2018 11:35 am

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].
ruudhabets
 
Posts: 3
Joined: Sat Dec 08, 2007 8:25 pm

Re: howto position a form

Postby UnklDonald418 » Mon Jul 09, 2018 6:02 pm

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.6 & LibreOffice 6.1.5.2 - Windows 10 Professional
UnklDonald418
Volunteer
 
Posts: 1084
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: howto position a form

Postby ruudhabets » Mon Jul 09, 2018 6:36 pm

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?)
ruudhabets
 
Posts: 3
Joined: Sat Dec 08, 2007 8:25 pm


Return to Forms

Who is online

Users browsing this forum: No registered users and 1 guest