View Single Post
# 1 10-12-2004 , 02:54 AM
Dann's Avatar
Registered User
Join Date: Feb 2003
Location: Los Angeles
Posts: 695

optionMenu confusion

I'm trying to create a script that uses an option menu, but I cannot figure out how to determine which menu item is currently selected by the user. I'm guesing I want to use -q or -pma, but I can't figure out what to do with them or what the syntax would be, not can I find anything in the docs to tell me.

Help!!

Thanks,
-dann


global proc optMenu2()
{

string $selected = "orange";

window -menuBar true -maximizeButton false -title "Option Menu" -iconName "optMenu2_I" -w 200 -h 150 optMenu2a_w;
columnLayout;

rowColumnLayout -numberOfRows 3;
optionMenu -label "Attributes" -q optMenu2a_w -cc "($selected = ???)";

menuItem -label "orange";
menuItem -label "blue";
menuItem -label "yellow";

showWindow optMenu2a_w;
}