IUP/Controls/IupLabel

From Vendetta Lua
Revision as of 09:17, 9 May 2023 by Draugath (talk | contribs) (Created page with "__NOTOC__ __NOEDITSECTION__ Creates a label interface element, which displays a text or an image. ===Creation=== :iup.label{title = '''title''': string} -> ('''elem''': ihand...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


Creates a label interface element, which displays a text or an image.

Creation

iup.label{title = title: string} -> (elem: ihandle)
title: Text to be shown on the label.
This function returns the identifier of the created label, or nil if an error occurs.

Attributes

BGCOLOR: Background color of the text.
FGCOLOR: Text color.
FONT: Font size of the text.
IMAGE: Label image. When this attribute is defined, the text is not shown.
TITLE: Label's text.
ACTIVE: Activates or deactivates the label. The only difference between an active label and an inactive one is its visual feedback. Possible values: "YES, "NO". Default: "YES".
ALIGNMENT: Label's alignment. Possible values: "ALEFT", "ARIGHT", "ACENTER". Default: "ALEFT".

Notes

Labels with images or texts can not change its behavior after mapped. This is a creation attribute. But after creation the image can be changed for another image, and the text for another text.
Though this element can have the IMAGE attribute, it does not have attributes IMINACTIVE and IMPRESS, because it does not interact with the user through the mouse or keyboard.
The '\n' character is accepted for line change, but the initial size of the element is computed for one line only. In this case, the EXPAND attribute must be "YES" so that the text can be properly visualized.

See Also

IupImage, IupButton.