IupLabel

IUP - Portable User Interface

IupLabel

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

Creation

Ihandle* IupLabel(char *title); [in C]
iuplabel{title = title: string} -> (elem: ihandle) [in IupLua3]
iup.label{title = title: string} -> (elem: ihandle) [in IupLua5]
label(title) [in LED]

title: Text to be shown on the label.

This function returns the identifier of the created label, or NULL (nil in IupLua) if an error occurs.

Attributes

BGCOLOR: Background color of the text.

FGCOLOR: Text color.

FONT: Character font 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".

SEPARATOR: Turns the label into a line separator. The EXPAND attribute is updated accordingly. Possible values: "HORIZONTAL", "VERTICAL".

Notes

Labels with images, texts or line separator 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.

Examples

See Also

IupImage, IupButton.