uhyperlink (Hyperlink)

The uhyperlink widget is a display-only widget that acts like a hyperlink in a web page. It activates a command when the user clicks it. It can only be used in form components. Uniface provides a logical widget called Hyperlink, which is mapped to uhyperlink.

Hyperlink widget, with pointing hand cursor

For more information, see Specifying a Widget for a Field or Entity and Using Transparent Hyperlinks as Labels

Widget Overview
Logical widget name: Hyperlink
Maps to physical widget:

uhyperlink

Default definition:

Hyperlink=uhyperlink(font=HyperLabel;transparency=on)

Use for: String fields
Supported triggers: trigger detail
Supported properties: See Widget Properties
Supported in Grid?: No
Supports MSAA?: No

Description

The uhyperlink is a display-only widget that is activates by clicking it. In this respect, it behaves like ucmdbutton, so it can be used where space on a form is limited or you want a different appearance. Unlike a command button, the hyperlink widget can contain only string data.

A hand cursor appears as soon the pointer is above the text of uhyperlink widget. The focus rectangle is not visible when the Transparency property is set.

You can give the uhyperlink widget the same appearance as an HTML hyperlink in a web browser by using the font and color properties of the widget.

Activating Triggers

The uhyperlink widget is for display only, so triggers associated with data modification are never fired. You can, however, use all other field-level triggers as you wish. Typically, you might use the field-level detail trigger to activate another component or spawn a web browser with a URL, for example:

spawn "C:\Program Files\Internet Explorer\Iexplore.exe http://refdesk.whitepages.com/"

You can set the Hyperlink property to False to disable the Detail trigger functionality and the hand cursor. This is useful for creating what appears to be a transparent, dynamic label at runtime.

Widget Properties

Hyperlink Widget Properties

Property

Physical name

Dynamic?

Background Color (BackColor)

BackColor

Yes

Foreground Color (ForeColor)

ForeColor

Yes

Horizontal Alignment (Halign)

Halign

Yes

Hyperlink

Hyperlink

Yes

Label Font (LabelFont)

LabelFont

Yes

Transparency

Transparency

Yes

Vertical Alignment (Valign)

Valign

Yes

Widget Font (Font)

Font

Yes

Popup Rectangle (PopupRect)

PopupRect

Yes