WoW:API Button SetFont: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Adding categories)
m (Move page script moved page API Button SetFont to API Button SetFont without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{widgetmethod}}
To set the font for this object please see, [[API_FontInstance_SetFont]].
To set the font for this object please see, [[API_FontInstance_SetFont]].


Line 4: Line 5:
   local MyButton = CreateFrame('Button', 'ButtonGlobalName' or nil, ParentFrame or nil, ButtonTemplate or nil)
   local MyButton = CreateFrame('Button', 'ButtonGlobalName' or nil, ParentFrame or nil, ButtonTemplate or nil)
   MyButton:SetFont(FontPath or nil, FontSize or nil, FontExtra or nil)
   MyButton:SetFont(FontPath or nil, FontSize or nil, FontExtra or nil)
Please, read [[API_FontInstance_SetFont]] for more exact details.
[[Category:Widget methods]]
[[Category:Widget methods]]

Latest revision as of 04:45, 15 August 2023

Widget API ← Button < SetFont

To set the font for this object please see, API_FontInstance_SetFont.

Instead of using FontInstance:SetFont use MyButtonObject:SetFont. Eg:

 local MyButton = CreateFrame('Button', 'ButtonGlobalName' or nil, ParentFrame or nil, ButtonTemplate or nil)
 MyButton:SetFont(FontPath or nil, FontSize or nil, FontExtra or nil)