SetMicroHelp
PowerScript function
Description
Specifies the text to be displayed in the MicroHelp box in an MDI
frame window.
Applies to
MDI frame windows
Syntax
|
1 |
windowname.SetMicroHelp ( string ) |
|
Argument |
Description |
|---|---|
|
windowname |
The name of the MDI frame window with MicroHelp for which |
|
string |
A string whose value is the new MicroHelp text |
Return value
Integer.
Returns 1 if it succeeds and -1 if an error occurs. If any
argument’s value is null, SetMicroHelp returns null.
Usage
The Tag property of a control is a useful place to store MicroHelp
text. When the control gets the focus, you can use SetMicroHelp in the
GetFocus event script to display the Tag property’s text in the MicroHelp
box on the window frame.
For menus, PowerBuilder automatically displays the MicroHelp text
you have specified in the Menu painter when the user selects the menu
item. You can use SetMicroHelp in the script for a menu item’s Selected
event to override the predefined MicroHelp and display some other text in
the MicroHelp box. SetMicroHelp does not change the predefined MicroHelp
text.
Examples
This statement changes the MicroHelp displayed in the frame of W_New
to Delete selected text:
|
1 |
W_New.SetMicroHelp("Delete selected text") |
In this example, the string Close the Window is a tag value
associated with the CommandButton cb_done in W_New. In the script for the
GetFocus event in cb_done, this statement displays Close the Window as
MicroHelp in W_New when cb_done gets focus:
|
1 |
W_New.SetMicroHelp(This.Tag) |