Scribusoid

Author Topic: Set column vertical alignment to middle via script?  (Read 211 times)

Gibbz

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
  • Scribus User
Set column vertical alignment to middle via script?
« on: September 26, 2018, 04: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...

a.l.e

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1585
  • Karma: 23
    • the graphics lab
Re: Set column vertical alignment to middle via script?
« Reply #1 on: September 26, 2018, 12:44:11 pm »
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