View Single Post
07-27-18, 04:45 PM   #8
Prejudice182
A Kobold Labourer
Join Date: Jul 2018
Posts: 1
I believe you have to initialize a new FontString to set a text value to it.

Code:
local macroBtn = CreateFrame("Button", "myMacroButton", UIParent, "SecureActionButtonTemplate")
macroBtn:SetAttribute("type1", "macro")
macroBtn:SetAttribute("macrotext1", "/s test")
macroBtn:SetSize(100,100)
macroBtn:SetPoint("TOPLEFT",50,0)
local macroBtnText =  macroBtn:CreateFontString()
macroBtnText:SetPoint("CENTER")
macroBtnText:SetSize(200,20)
macroBtnText:SetFont("Fonts\\FRIZQT__.TTF", 12, "OUTLINE")
macroBtnText:SetText("HOP")
This gives the following output, highlighted with framestack.
  Reply With Quote