Skip to content
Robert Jelic edited this page Apr 2, 2022 · 11 revisions

FYI: The label is currently a one liner, i will improve the label to be a multiliner. one of my TODOs

Labels are objects, where you are able to put some text onto the screen. Here is a example of how to create a default Label:

local mainFrame = CreateFrame("myFirstFrame"):show()
local aInput = mainFrame:addLabel("myFirstLabel"):show()

This will create a default label with a size 1 width and 1 height on position 1 1 (relative to its parent frame), the default background is the parent background, the default text color is also the parent text color and the default zIndex is 1.

Here are all possible functions available for labels. Remember label inherit from object:

setText

sets the text of your label, it automatically adjusts the width to the text len. If you by any chance dont want the width to be able to change, use :setValue() instead

local mainFrame = CreateFrame("myFirstFrame"):show()
local aLabel = mainFrame:addLabel("myFirstLabel"):setText("I am a label!"):show()

args: some text
returns: the object

Wiki Navigation

Home

Clone this wiki locally