forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmenuPick.xml
More file actions
46 lines (46 loc) · 4.4 KB
/
Copy pathmenuPick.xml
File metadata and controls
46 lines (46 loc) · 4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<doc>
<legacy_id>2312</legacy_id>
<name>menuPick</name>
<type>message</type>
<syntax>
<example>menuPick <i>chosenItem</i>[|<i>submenuName</i>],<i>previousTab</i></example>
</syntax>
<library></library>
<objects>
<button/>
</objects>
<synonyms>
</synonyms>
<classification>
<category>Menus</category>
</classification>
<references>
<command tag="pulldown">pulldown Command</command>
<property tag="menuName">menuName Property</property>
</references>
<history>
<introduced version="1.0">Added.</introduced>
</history>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
</security>
<summary>Sent to a <keyword tag="button">button</keyword> when a <glossary tag="menu item">menu item</glossary> is chosen from the <keyword tag="menu">menu</keyword> associated with that <keyword tag="button">button</keyword>.</summary>
<examples>
<example>on menuPick theItem <i>-- in a pulldown menu</i></p><p> if theItem is "Close" then close the defaultStack</p><p> else if theItem is "Quit" then quit</p><p>end menuPick</example>
</examples>
<description>
<p>Handle the <b>menuPick</b> <keyword tag="message box">message</keyword> to do something when the user chooses a <glossary tag="menu item">menu item</glossary> from a <glossary tag="button menu">button menu</glossary>, or chooses a tab in a <glossary tag="tabbed button">tabbed button</glossary>.</p><p/><p><b>Parameters:</b></p><p>The <i>chosenItem</i> is the label of the <glossary tag="menu item">menu item</glossary> the user chose. If the <glossary tag="menu item">menu item</glossary> is part of a <glossary tag="cascading menu">submenu</glossary>, the menu item label is followed by a vertical bar (|) and the submenu's label.</p><p/><p>The <i>previousTab</i> is the text of the <glossary tag="menu item">menu item</glossary> that was selected before the user chose a new <glossary tag="menu item">menu item</glossary>. This <glossary tag="parameter">parameter</glossary> is included only if the <glossary tag="button">button's</glossary> <property tag="menuMode">menuMode</property> <glossary tag="property">property</glossary> is set to "tabbed".</p><p/><p><b>Note:</b> If the specification of a menu or submenu includes a tag, that tag will replace the menu label in the <i>chosenItem</i> parameter</p><p/><p><b>Comments:</b></p><p>The <b>menuPick</b> <keyword tag="message box">message</keyword> is sent when the user clicks a tab in a <glossary tag="tabbed button">tabbed button</glossary>, when the user chooses a <glossary tag="menu item">menu item</glossary> from the <keyword tag="menu">menu</keyword> associated with a <keyword tag="button">button</keyword>, or when a <glossary tag="button">button's</glossary> <property tag="menuHistory">menuHistory</property> <glossary tag="property">property</glossary> is set by a <glossary tag="handler">handler</glossary>.</p><p/><p>The <b>menuPick</b> <keyword tag="message box">message</keyword> is sent every time a <glossary tag="menu item">menu item</glossary> is chosen, even if the <keyword tag="menu">menu</keyword> is a type that retains its state (such as an option menu) and the chosen <glossary tag="menu item">menu item</glossary> has not changed. (However, no <b>menuPick</b> <keyword tag="message box">message</keyword> is sent when an already-chosen tab in a <glossary tag="tabbed button">tabbed button</glossary> is clicked, since no menu is displayed.)</p><p/><p>To get the item number of the currently chosen menu item, use the <b>menuHistory</b> <glossary tag="property">property</glossary>.</p><p/><p><b>Note:</b> The & and / characters can be used in a pulldown menu to create special effects. To be shown (instead of creating these effects), either <keyword tag="character">character</keyword> can be doubled. (For example, placing the line "This && That" in a <glossary tag="menu item">menu item</glossary> results in the <glossary tag="menu item">menu item</glossary> being displayed as "This & That", with one ampersand.) When the user chooses a <glossary tag="menu item">menu item</glossary> with these special characters, the <i>chosenItem</i> <glossary tag="parameter">parameter</glossary> is the text that appears in the menu as displayed, not the text of that line of the <glossary tag="button menu">menu button</glossary>.</p>
</description>
</doc>