Hot Labels in Xdialog Boxes
Syntax
##Label_Text!Event_Name~~
Argument |
Type |
Description |
| Variable_Name | C |
The name of a character variable to receive the user selection, or a numeric variable to receive the index value of the selected radio button. The index of the top-most button is 1. |
| Event_Name | C |
The name of the event. |
| help_Event_Name | C |
The name of the help text variable associated with Event_Name. |
Description
The Xdialog that contains hot labels is constructed in a the following manner. First, the body of the dialog is created as a character variable named dlg_body.
dlg_body = <<%dlg% {wrap=100} This example demonstrates how you can create dialog boxes with 'hot' labels. When you click the mouse on a label, a small window pops up offering help to the user on the parameter referenced by the label. This is a convenient alternative to creating a stand-alone help file and hooking the help file into your Xdialog.; {lf}; ##Hot Label !labelevent~~; {lf}; <10&OK!ok> <10&Close!close>; %dlg% |
Next, the event handling code is created as a character variable named dlg_event.
dlg_event = <<%code% if a_dlg_button = "ok" then ui_msg_box("","User pressed the OK button.") a_dlg_button = "" end if %code% |
The help text is saved as a character variable named help_labelevent. The help text may be of arbitrary length and use any type of HTML coding.
help_labelevent = <<%a% <body bgcolor="#CCFFCC"> <h4>Standard HTML</h4> This help text may contain any HTML coding and be of arbitrary length. %a% |
Finally, the dialog body variable is preprocessed and displayed in the following manner.
dim x as P x = a5_xdialogPreProcess(dlg_body) ui_dlg_box("Hot Labels", x.dlg_body, x.dlg_event + dlg_event) |
Examples
When the mouse is over the label, the label is underlined, indicating that the label can be clicked. When you click the label, a popup window appears, in which you can define help. Use HTML syntax to create beautifully formatted help. Even use a CSS stylesheet to define a consistent look. [Picture] [Picture] [Picture]

Dialog Before Cursor

Dialog After Cursor

Pop-up Help
Supported By
Alpha Five Version 6 and Above
See Also
Displaying Dynamic Help When Clicking on a Label, Xdialog Language Directives and Operators, Xdialog Control Reference