# IupGLText

Definition: | include pGUI.e Ihandle ih = IupGLText([[nullable_string action=NULL,] cbfunc func=NULL,] string attributes="", dword_seq args={})
Description: | Creates an embedded OpenGL text interface element, which displays a text and allows to edit it when clicked. It inherits from IupGLSubCanvas. It exists only inside an IupGLCanvasBox. Internally uses an IupText when the user clicks the control to allow the user to edit the text. Once the IupText loses its focus the text is updated and the IupText is hidden. The IupText is an internal child of the IupGLText. The application can use the IupGetChild function to get access to the IupText control. action: must be "VALUECHANGED_CB" or NULL (which is replaced with "VALUECHANGED_CB"), if provided. func: a callback address, usually specified as Icallback("name"). For more information on the attributes and args parameters see IupSetAttributes. This is a paranormalised function. Returns: the identifier of the created element.
pwa/p2js: | Not supported.
See Also: | IupText
Notes: | Visually the difference between an IupGLText and an IupGLButton is that by default the border is always visible in the IupGLText.
Attributes: | The IupGLText element handles all attributes defined for a IupGLSubCanvas control.
ALIGNMENT | (non inheritable) horizontal and vertical alignment. Possible values: "ALEFT", "ACENTER" and "ARIGHT", combined to "ATOP", "ACENTER" and "ABOTTOM". Default: "ALEFT:ATOP". Partial values are also accepted, like "ARIGHT" or ":ATOP", the other value will be used from the default value. When editing only horizontal alignment is used.
FGCOLOR | Text color. Can have an alpha component. Default: "0 0 0".
PADDING | (non inheritable) internal margin. Default value: "2x2".
CPADDING | same as PADDING but using the units of the SIZE attribute. It will actually set the PADDING attribute. (since 3.29)
SIZE | (non inheritable) Since the contents can be changed by the user, the Natural Size is not affected by the text contents. Use VISIBLECOLUMNS and VISIBLELINES to control the Natural Size.
TEXT | (non inheritable) returns the name of the internal IupText used to edit the text when the user clicks the control. Another way to get access to the internal child IupText.
TEXT_HANDLE | (non inheritable): returns the Ihandle of the internal IupText.
VALUE | (non inheritable): Text entered by the user.
VISIBLECOLUMNS | Defines the number of visible columns for the Natural Size, this means that will act also as minimum number of visible columns. It uses a wider character size than the one used for the SIZE attribute so strings will fit better without the need of extra columns. As for SIZE you can set to NULL after map to use it as an initial value. Default: 5
Callbacks | The IupGLText element handles all callbacks defined for the IupGLSubCanvas control.
VALUECHANGED_CB | Called after the value was interactively changed by the user. function valuechanged_cb(Ihandle ih) ih: identifier of the element that activated the event.