Hello,
I know how to create a 2-level menu for somehting like:
Fruits>Apple
Banana
Oranges
var choice = app.popUpMenuEx(
{cName: "Fruits",
oSubMenu: [ {cName: "Apple", cReturn: "Apple" }, {cName: "Banana", cReturn: "Banana" }, {cName: "Melon", cReturn: "Melon" } ]},
But what would the code look like for something like (3 level):
Fruits>Apple
Banana
Oranges>Navel
Valencia
Moro (Blood)
or even something like this (4-levels):
Location A......>Site A......>Properties...>Property1
Property2
Property3
Site B>
Site C>
Location B>
Location C>
So overall, how would the above script for a 2-level popup menu be modified for a 3, 4, or more level popup menu?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
You can add the oSubMenu values at any level, so;
var choice = app.popUpMenuEx(
{cName: "Fruits",
oSubMenu: [ {cName: "Apple", cReturn: "Apple" },
{cName: "Banana", cReturn: "Banana" },
{cName: "Oranges",
oSubMenu: [ {cName: "Navel" },
{cName: "Valencia" },
{cName: "Moro (Blood)" } ] }
]
});
console.println(choice.toSource());
Would give you the menu in your first example. If the cReturn value is the same as the cName then you can just leave it off (as I have for th 3rd level menu).
Regards
Bruce
Views
Replies
Total Likes
Hi,
You can add the oSubMenu values at any level, so;
var choice = app.popUpMenuEx(
{cName: "Fruits",
oSubMenu: [ {cName: "Apple", cReturn: "Apple" },
{cName: "Banana", cReturn: "Banana" },
{cName: "Oranges",
oSubMenu: [ {cName: "Navel" },
{cName: "Valencia" },
{cName: "Moro (Blood)" } ] }
]
});
console.println(choice.toSource());
Would give you the menu in your first example. If the cReturn value is the same as the cName then you can just leave it off (as I have for th 3rd level menu).
Regards
Bruce
Views
Replies
Total Likes
Thanks BR001! I appreciate your help.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies