Following on from the previous post on Label controls another new item we’ve added to OpenInsight is the Hyperlink control, which is essentially a specialized Label control that allows you to implement clickable links on your forms.
Barring HTML rendering it supports all the other properties of a Label control as well as adding a few others:
If this property is TRUE then the control ensures the text is underlined when the mouse hovers over it.
This property contains the command string to execute when the link is (single) clicked. it can be any valid Windows command string (internally it is passed to the Windows ShellExecute function).
Note that that the CLICK and DBLCLK events are still fired as normal even if the LINK property is blank, so you still have full control over the hyperlink target.
This specifies the cursor to use when the mouse is over the link text. It defaults to the standard “hand” cursor but can be set in the same way as the normal OpenInsight CURSOR property.
When the command string in the LINK property is executed the result of the operation (as returned from the ShellExecute function) is placed in the LINKRESULT property for further examination if you wish (ShellExecute normally returns a value < 32 if there is a problem executing a command).
If this property is TRUE the link will be displayed using the VISITEDFORECOLOR property when it has been clicked at least once.
This property specifies the color to use for visited links (i.e. those that have been clicked and have a SHOWVISITED property of TRUE).
The GO method
The Hyperlink control also supports a new GO method that executes the contents of the LINK property as though it had been clicked. The return value from this method is the same as the value returned in the LINKRESULT property.
(Disclaimer: This article is based on preliminary information and may be subject to change in the final release version of OpenInsight 10).