Ask Your Question
0

change alignment with macro

asked 2017-09-04 15:52:07 +0200

Albert Oldhand gravatar image

Can the alignment of a textfield be changed by a macro?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-09-04 17:07:39 +0200

Ratslinger gravatar image

Yes:

oForm = ThisComponent.Drawpage.Forms.getbyname("Your_Form")
oField = oForm.getByName("Your_Field")
oField.Align = 1    '0=Left; 1=Center; 2=Right

If this answers your question please click on the ✔ (upper left area of answer).

edit flag offensive delete link more

Comments

I am using Access2Base and it raises an error somewhere in that code.

If I use Drawpage, it comes up with "Drawpage method not found". How is that possible?

Albert Oldhand gravatar imageAlbert Oldhand ( 2017-09-06 16:43:17 +0200 )edit

It would have been helpful if you mentioned Access2Base in your question!

Still, you should be able to do this - YOURCONTROL.Align = 1.

Ratslinger gravatar imageRatslinger ( 2017-09-06 17:11:26 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-09-04 15:52:07 +0200

Seen: 140 times

Last updated: Sep 04 '17