Kbase 19372: How to create hot spots or text like hyperlinks with the 4GL
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  1/3/2000 |
|
Title: How to create hot spots or text like hyperlinks with the 4GL
KnowledgeBase number: 19372
Creation Date: 01-January-2000
Modified Date:
This document applies to : Progress Provision or Progress 4GL
Version and Release Number: Progress V7, V8, V9
Details:
This knowledgebase entry describes how to create hot spots or text that appears like hyperlinks from the 4GL.
This can be done using either using 4GL from the procedure editor or using the UIB (AppBuilder). However, the latter is recommended since it gives you flexibility in positioning and sizing the objects in a window.
A simple way to to have hot spots or text like hyperlinks is to have a text widget enclosed in a rectangle, which should be enabled and have a mouse select-click trigger defined with the desired code. The rectangle Edge Pixels attribute can be set to zero in order to hide it.
Steps using the UIB (AppBuilder)
1. Open a Window in the UIB
2. Add a text widget to the window
3. Double-click on the text widget to get its property sheet to change its text and foreground color. For instance use foreground color 9 which default setting is blue.
4. Add a rectangle to enclose the text.
5. Double-click the regtangle to get the property sheet dialog and change the Edge Pixels to 0 and unselect the Filled option.
6. Use CTRL-S to get to the mouse-select-click trigger for the rectangle and add the desired code. For example a message:
MESSAGE "Hello!" VIEW-AS ALERT-BOX.
7. Run the application and just click on the text to test the hot spot.
Example program that shows the 4GL code used to have the hot spot.
DEFINE BUTTON Btn_Done LABEL "&Done" AUTO-GO.
DEFINE RECTANGLE RECT-1
EDGE-PIXELS 2 NO-FILL
SIZE 8 BY 2.
FORM
RECT-1 AT ROW 2 COL 10
"Hello" VIEW-AS TEXT SIZE 6 BY 1 AT ROW 2.5 COL 11 FGCOLOR 9
Btn_Done AT ROW 4 COL 30
WITH FRAME test SIZE 40 BY 5 THREE-D.
ON MOUSE-SELECT-CLICK OF RECT-1 DO:
MESSAGE "Hello!" VIEW-AS ALERT-BOX.
END.
ENABLE RECT-1 WITH FRAME test.
UPDATE Btn_Done WITH FRAME test.
Reference to written documentation
- Progress Programming Handbook
- Progress Language Reference
EAG/01-Jan-2000