CONTEXTMENU Attribute | contextMenu Property
Sets or gets a string value that indicates whether the context menu is displayed when the right mouse button is clicked.
Syntax
HTML <HTA:APPLICATION CONTEXTMENU = sContextMenu... > Scripting [ sContextMenu = ] HTA:APPLICATION.contextMenu
Possible Values
sContextMenu A String that specifies one of the following values.
- yes
- Default. Context menus are displayed.
no
- Context menus are not displayed.
The property is read-only. The property has a default value of yes.
Remarks
Note The contextMenu property is read-only; however, the CONTEXTMENU attribute can be used to set the initial value.
Example
This example shows how to get the contextMenu property.
<HTML> <HEAD> <HTA:APPLICATION ID=oHTA CONTEXTMENU="no" /> <TITLE>HTA Properties</TITLE> <STYLE> BODY {font-size: 8pt; font-family: Arial;} </STYLE> </HEAD> <SCRIPT> function readFun() { alert("The contextMenu property is set to: " + oHTA.contextMenu); } </SCRIPT> <BODY> <P>Read the property: <INPUT TYPE="button" VALUE="Test contextMenu value" onClick="readFun()"/> </P> </BODY> </HTML>
Applies To
HTA:APPLICATION