IUP/Controls/IupLabel: Difference between revisions
From Vendetta Lua
Jump to navigationJump to search
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
__NOEDITSECTION__ | __NOEDITSECTION__ | ||
{{IUP Controls}} | |||
Creates a label interface element, which displays a text or an image. | Creates a label interface element, which displays a text or an image. | ||
===Creation=== | ===Creation=== | ||
iup.label{title = '''title''': string} -> ('''elem''': ihandle) | |||
:'''title''': Text to be shown on the label. | :'''title''': Text to be shown on the label. | ||
Line 25: | Line 26: | ||
:'''[[IUP/Attributes/ALIGNMENT|ALIGNMENT]]''': Label's alignment. Possible values: "ALEFT", "ARIGHT", "ACENTER". Default: "ALEFT". | :'''[[IUP/Attributes/ALIGNMENT|ALIGNMENT]]''': Label's alignment. Possible values: "ALEFT", "ARIGHT", "ACENTER". Default: "ALEFT". | ||
:'''[[IUP/Attributes/Common/SIZE|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=== | ===Notes=== | ||
Line 37: | Line 52: | ||
:[[IUP/Controls/IupImage|IupImage]], [[IUP/Controls/IupButton|IupButton]]. | :[[IUP/Controls/IupImage|IupImage]], [[IUP/Controls/IupButton|IupButton]]. | ||
[[Category:IUP Controls]] |
Latest revision as of 21:16, 11 May 2023
Controls |
Dialog |
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".
- 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.