Scribus Forums

Scribus => Scripts and Plugins => Topic started by: Gibbz on September 26, 2018, 03:00:12 AM

Title: Set column vertical alignment to middle via script?
Post by: Gibbz on September 26, 2018, 03:00:12 AM
Hey all,

Im looking for a way to change the vertical alignment setting via the python api.
I want to set it from Top to Middle.
I cant find a way to change this...
Title: Re: Set column vertical alignment to middle via script?
Post by: a.l.e on September 26, 2018, 11:44:11 AM
the vertical align has been added late to scribus and is probably not available in the scripter.
of course, you're welcome to create a patch that adds the command to the scripter!
it's really not that hard... it's almost all copy paste.
just raise a hand if you need help for doing it.

before the feature was available, i did create a script that tried to an "as good as possible" vertical centering. if you don't feel like patching scribus, you can use it in your script:

https://superuser.com/questions/231576/scribus-vertically-align-text-within-a-text-frame

you can download a copy from here:

https://raw.githubusercontent.com/aoloe/scribus-script-collection/master/text-vertical-align/text-vertical-align.py

ciao
a.l.e
Title: Re: Set column vertical alignment to middle via script?
Post by: fredzannarbor on October 12, 2020, 08:22:23 PM
As a followup it appears that this is now supported using setTextVerticalAlignment and ALIGNV_CENTERED.