Quantcast WoWInterface - View Single Post - Help on ScrollFrame with LUA
View Single Post
02-14-13, 09:50 PM   #24
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,616
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, oUF_Phanx, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
  Reply With Quote