Selected
PowerScript event
Description
Occurs when the user highlights an item on the menu using the arrow
keys or the mouse, without choosing it to be executed.
Event ID
|
Event ID |
Objects |
|---|---|
|
None |
Menu |
Arguments
None
Return Values
None. (Do not use a RETURN statement.)
Usage
You can use the Selected event to display MicroHelp for the menu
item. One way to store the Help text is in the menu item’s Tag
property.
Examples
This example uses the tag value of the current menu item to display
Help text. The function wf_SetMenuHelp takes the text passed (the tag) and
assigns it to a MultiLineEdit control. A Timer function and the Timer
event are used to clear the Help text.
This code in the Selected event calls the function that sets the
text:
|
1 |
w_test.wf_SetMenuHelp(This.Tag) |
This code for the wf_SetMenuHelp function sets the text in the
MultiLineEdit mle_menuhelp; its argument is called menuhelpstring:
|
1 2 |
mle_menuhelp.Text = menuhelpstring Timer(4) |
This code in the Timer event clears the Help text and stops the
timer:
|
1 2 |
w_test.wf_SetMenuHelp("") Timer(0) |
See also