View Single Post
Unread 02-14-13, 09:50 PM   #24
No Life!
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,145
Originally Posted by gmarco View Post
Later I'll try to understand how to make a left justified button text :-)
However, depending on the template used, you may need to adjust the font string's points as well. For example, if the font string is anchored by its CENTER point to the button's CENTER point, left-aligning the text will make it start in the center of the button, so you'd need to do something like this:

local fontstring = button:GetFontString()
fontstring:SetPoint("LEFT", button, 8, 0)
fontstring:SetPoint("RIGHT", button, -8, 0)
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addon Turn any code into an addon More addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please dont PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote