Author Topic: Additional Element Attribute (Vertical Alignment)  (Read 1147 times)

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 362
In addition to the existing (horizontal) "align" attribute , can vertical alignment also be supported? (e.g vAlign="Top/Center/Bottom")
Thanks in advance.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33114
did you try prefixing the alignment value with one of: Top, Middle, Bottom ?
align="Top"
align="Middle.Center"
align="Bottom.Right"
etc

Mayibongwe

  • Sr. Member
  • ****
  • Posts: 362
Code
<element type="Text" xAnchor="Panel.Left" yAnchor="Panel.Top" widthDock="X:Panel.Right" heightDock="Y:Panel.Bottom" font="Segoe UI" style="Regular" size="35" fg="0,255,0" align="Middle.Center">Middle.Center</element>
I've tested the following using the element above.

align="Top/Middle/Bottom/Left/Top.Left/Top.Center/Top.Right"...element is positioned top left.
align="Middle.Left/Middle.Center/Middle.Right"...............................element is cut off at the top left of the screen.
align="Bottom.Left/Bottom.Center/Bottom.Right"............................element is out of bounds. Does not appear anywhere on screen.

Steven

  • Administrator
  • Hero Member
  • *****
  • Posts: 33114
for the Text element only the horizontal alignment is implemented and always vertically aligned to the top - using "Top.","Middle.","Bottom." will cause it to fail.
So i would need to implement new functionality. I wont promise this can be done as i vaguely recall it was intentional and needs to be vertically aligned to the top for certain functionality to work