Page 1 of 1

[Solved] Howto position a form

Posted: Mon Jul 09, 2018 11:35 am
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

Re: howto position a form

Posted: Mon Jul 09, 2018 6:02 pm
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?

Re: howto position a form

Posted: Mon Jul 09, 2018 6:36 pm
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?)