IUP/Controls/IupLabel: Difference between revisions
From Vendetta Lua
Jump to navigationJump to search
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..." |
No edit summary |
||
Line 5: | Line 5: | ||
===Creation=== | ===Creation=== | ||
:iup.label{title = '''title''': string} -> ('''elem''': ihandle) | :iup.label{title = '''title''': string} -> ('''elem''': ihandle) | ||
:'''title''': Text to be shown on the label. | :'''title''': Text to be shown on the label. | ||
Revision as of 09:18, 9 May 2023
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.