Setting A Menu Item's State Programmatically; Setting A Menu Item's Checked State; Setting A Menu Item's Enabled State - Adobe GoLive CS2 Programmer's Manual

Hide thumbs Also See for GoLive CS2:
Table of Contents

Advertisement

SDK Programmer's Guide
"shift+alt"
"control+shift+alt"
You cannot, however, specify only alt or only shift .
The value "control" assigns the C
assigns the A
resulting shortcut key combination in Windows is C
You are responsible for assigning a keyboard shortcut that is not already in use. If there is a conflict, the
result is unpredictable.

Setting a Menu Item's State Programmatically

You can enable or disable menu items programmatically, and check or uncheck items. You can choose to
initialize a menu item's enabled or checked state dynamically when it is first displayed.

Setting a menu item's checked state

You can set a menuItem object's checked property to specify whether GoLive is to place a check mark
next to the object's corresponding menu item. A value of true specifies that the menu item has a check
mark, as shown for the Subitem menu item in the example above. The actual appearance of the checked
state depends on the host operating system.
In this example, the registered handler for the menuSignal event toggles this property each time the
user chooses the Toggle Check for Subitem 2 menu item.
<!-- Check mark Example ------------------->
<jsxmenubar>
<jsxmenu name="myMenu" title="Hello, GoLive!">
</jsxmenu>
</jsxmenubar>
<script>
function initializeModule() {
menubar['myMenu'].items['toggle'].addEventListener( 'menuSignal',
}
</script>

Setting a menu item's enabled state

You can set a menuItem object's enabled property to specify whether the menu item is enabled or
disabled. This is a Boolean property; when the value is true , the item is enabled, or active. When it is
false , the menu item is disabled or inactive; it is "grayed out" and does not respond to clicks. Menu items
key in Windows, and the O
LT
<jsxitem name="doThis" title="Do Something">
<jsxmenu name="subMenu" title="Submenu">
<jsxitem name="toggle" title="Toggle Check for Subitem 2">
<jsxitem name="sub2" title="Subitem">
</jsxmenu>
<jsxitem name="doThat" title="Do Something Else">
function(e){e.target.checked = !e.target.checked;});
Adobe GoLive CS2 SDK
key in WIndows, and the C
TRL
key in Mac OS. In the example above, for instance, the
PT
+A
TRL
LT
key in MacOS. The value "alt"
MD
+ o , and in Mac OS is C
MD
Menus and Toolbars
46
+O
+ o .
PT

Advertisement

Table of Contents
loading

Table of Contents