WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   Wrap button text (https://www.wowinterface.com/forums/showthread.php?t=58652)

Benalish 03-27-21 03:53 PM

Wrap button text
 
Is there a way to set the maximum text length of a button, so that the text cannot come out from it?
For example, if I set the text with

Lua Code:
  1. button.text:SetText("This is a long long long text")

how can i make the text look like

Lua Code:
  1. This is a long...

Thanks in advance

Fizzlemizz 03-27-21 05:11 PM

Either fix the size of the fontstring or anchor both ends

Code:

button.Text:ClearAllPoints()
button.Text:SetPoint("LEFT", 4, 0)
button.Text:SetPoint("RIGHT", -4, 0)


Benalish 03-28-21 07:47 AM

Thank you very much!


All times are GMT -6. The time now is 12:29 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI