IUP/Controls/IupLabel

From Vendetta Lua
Jump to navigationJump to search


Controls

Dialog
Fill
Hbox
Vbox
Zbox
Cbox
Radio
Button
Canvas
Frame
Label
List
Multiline
Text
Toggle
Progress Bar
Matrix
Tree
Navmap

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".
SIZE
POINTSIZE: Possible values: "YES", "NO"
WORDWRAP: Possible values: "YES", "NO"
QUANTIZE: Possible values: "YES", "NO"
SEGMENTED: Defines the point on an image where it will be split and stretched. The value should be a string consisting of 4 numbers separated by spaces. The numbers should have values between 0 and 1. Each number represents a side: left, top, right, bottom. "number number number number"
UV: The value should be a string consisting of 4 numbers separated by spaces. The numbers should have values between 0 and 1. Each number represents a side: left, top, right, bottom. "number number number number"
CENTERUV

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.