You are here: Home News & Events Tutorial Tutorial 2008-05: Form Embedded Hotlinks
Document Actions

Tutorial 2008-05: Form Embedded Hotlinks

Hydra 4GL supports Hotlinks which can act like normal buttons or call up a browser window with a specified URL.

Form Embedded Hotlink Widget

Hotlinks can be used to trigger key or action events (acting like a normal button) OR to launch the browser

Visual characteristic

A hotlink will always be displayed with the attribute 'Underlined'. Different to web page hotlinks, it will not change it's colour if it is clicked on once. The visual appearance will also not indicate, if the hotlink is enabled or disabled.

Enabled/Disabled State:

A hotlink will be initialy drawn disabled. It can be enabled/disabled just like a normal form button.

Activated    DISPLAY “!” TO <hotlink field name>
Deactivated   DISPLAY “*” TO <hotlink field name>

The hotlink label text AND the associated event/URL is dynamic and can be changed at runtime
Syntax to change a normal key/action event hotlink:

DISPLAY “<KEY/ACTION> {<my label text>}” TO <hotlink field name>

Syntax to change an URL event hotlink:

DISPLAY “<URL> {<my label text>}” TO <hotlink field name>

Example:

DISPLAY “F1 {My Help}” TO hl_help
DISPLAY “www.querix.com {My Querix Website}” TO hl_home_url

You can also only update the URL of the hotlink

DISPLAY “www.google.com” TO hl_control

Hotlinks support following graphical attributes:


LEFT, RIGHT, CENTER
BOLD
COLOR (Red, Blue, Green, …)
UNDERLINE
Font (Script)

Hotlink as a Key/Action Event


Example:
hl_cust_email=formonly.hl_cust_email,
 config=“F5 {Save}",
 widget="hotlink", 
 color=bold Blue;


Hotlink as a URL - Website launcher


The follosing will launch the URL www.querix.com

Example:
hl_home=formonly.hl_home,
 config=“http://www.querix.com
  {Querix Home Page}",
 widget="hotlink", 
 color=bold Blue Underline;

Hotlink as a URL - Email launcher

The follosing will launch your default e-mail client

Example:
hl_cust_email=formonly.hl_cust_email,
 config="mailto:info@querix.com
  {Write me an e-mail}",
 widget="hotlink", 
 color=bold Blue Underline;

Hotlink as a URL – File System launcher


Will launch your Browser for drive C:


Example:


hl_drive=formonly.hl_drive,
 config=“file://c:
  {Browse local C: Drive}",
 widget="hotlink", 
 color=bold Blue Underline;