Skip to content
Elysio Martins edited this page Nov 4, 2023 · 1 revision

label

What is a Label?

A label is a form element used to display text with specific attributes such as color, size, or font type.

How to Create a Label on My Root Builder? 🔥

  1. Instantiate the label :
$label = Label::create("label_test", "Hello EasyUIBuilder !");
  1. Set the desired properties:
// Set the text of the Label
$label->setText($text);

// Set the font size of the Label
$label->setFontSize($fontSize);

// Set the font scale factor of the Label
$label->setFontScaleFactor($fontScaleFactor);

// Enable or disable shadow for the Label
$label->setShadow(true); // Enable shadow
$label->setShadow(false); // Disable shadow

// Set the color of the Label
$label->setColor($color);

// Set the font type of the Label
$label->setFontType($fontType);

# # Other functions are useful, but it's up to you to discover them!
  1. Ajouter le label a mon root
# Add the label to my root:
$root->addElement($label);
Clone this wiki locally