# IupLink

Definition: | include pGUI.e Ihandle ih = IupLink(nullable_string url=NULL, nullable_string title=NULL, [[nullable_string action=NULL,] cbfunc func=NULL,] string attributes="", dword_seq args={})
Description: | Creates a label that displays an underlined clickable text. It inherits from IupLabel. url: the destination address of the link. Can be any text or NULL. If IupHelp is used (see below) should be a valid URL. Sets the URL attribute. title: Text to be shown on the link. It can be NULL. It will set the TITLE attribute. action: Name of the action generated when the button is selected. It can be NULL. 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 [yet] supported
See Also: | IupLabel, IupHelp IupGLLink
Notes: | 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. This function is paranormalised for times when the target is not actually a URL, but, for instance, should open an application specific configuration dialog, however IupLink("http://google.co.uk") still works perfectly. The IupLabel callbacks BUTTON_CB, ENTERWINDOW_CB and LEAVEWINDOW_CB are used internally. Drag & Drop attributes and callbacks are supported. An example can be seen in demo\pGUI\sample.exw
Attributes: | 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".
Callbacks: |
ACTION | Action generated when the link is activated. function action_cb(Ihandle ih, atom pUrl) ih: identifier of the element that activated the event. pUrl: the destination address of the link (a char*). Returns: IUP_CLOSE will be processed. If returns IUP_DEFAULT or it is not defined, the IupHelp function will be called.