-
Notifications
You must be signed in to change notification settings - Fork 7
Label
Elysio Martins edited this page Nov 4, 2023
·
1 revision
A label is a form element used to display text with specific attributes such as color, size, or font type.
- Instantiate the label :
$label = Label::create("label_test", "Hello EasyUIBuilder !");
- 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!
- Ajouter le label a mon root
# Add the label to my root:
$root->addElement($label);