My test code shows that textfield ignores style.horizontal_align.
Is this correct / expected behavior?
[bug?] luaguielement textfield and style.horizontal_align
[bug?] luaguielement textfield and style.horizontal_align
Last edited by adamius on Mon Jun 24, 2019 2:31 pm, edited 1 time in total.
Re: luaguielement textfield and style.horizontal_align
Works for me:
Did you assign anything invalid?
Code: Select all
style.horizontal_align = "center"
Re: luaguielement textfield and style.horizontal_align
Try aligning it left. Make the amount of text longer than what fits.
Different examples:
/c local t = game.players[1].gui.left.add{name="sometextfield",text="L12345678901234567890C123456789012344567890R",type="textfield"} ; t.style.horizontal_align="left"; t.style.width=1000
/c local t = game.players[1].gui.left.add{name="somebutton",caption="L12345678901234567890C123456789012344567890R",type="button"} ; t.style.horizontal_align="left"; t.style.width=1000
horizontal_align works fine on buttons but not textfields.
Different examples:
/c local t = game.players[1].gui.left.add{name="sometextfield",text="L12345678901234567890C123456789012344567890R",type="textfield"} ; t.style.horizontal_align="left"; t.style.width=1000
/c local t = game.players[1].gui.left.add{name="somebutton",caption="L12345678901234567890C123456789012344567890R",type="button"} ; t.style.horizontal_align="left"; t.style.width=1000
horizontal_align works fine on buttons but not textfields.