IupLink (since 3.8)

Creates a label that displays an underlined clickable text. It inherits from IupLabel.


Ihandle* IupLink(const char *url, const char * title); [in C]
iup.link{[url = url: string], [title = title: string]} -> (ih: ihandle) [in Lua]
link(url, title) [in LED]

url: the destination address of the link. Can be any text. If IupHelp is used should be a valid URL. It can be NULL. It will set the URL attribute.
title: Text to be shown on the link. It can be NULL. It will set the TITLE attribute.

Returns: the identifier of the created element, or NULL if an error occurs.


Inherits all attributes and callbacks of the IupLabel, but redefines a few attributes.

FGCOLOR: Text color. Default: the global attribute LINKFGCOLOR.

URL: the default value is "YES".


ACTION: Action generated when the link is activated.

int function(Ihandle* ih, char *url); [in C]
ih:action(url: string) -> (ret: number) [in Lua]

ih: identifier of the element that activated the event.
url: the destination address of the link.

Returns: IUP_CLOSE will be processed. If returns IUP_DEFAULT or it is not defined, the IupHelp function will be called.


When the cursor is over the text, it is changed to the HAND cursor.

If the callback is not defined the IupHelp function is called with the given URL.

The IupLabel callbacks BUTTON_CB, ENTERWINDOW_CB and LEAVEWINDOW_CB are used internally.


Browse for Example Files

See Also

IupLabel, IupHelp.