Setting Default Selected Item in a Combo BoxWhen using a combo box, how can I set it to display the currently selected item by default? For example, if the default is the first item, which is "1", what should I do to have the combo box show "7" as the currently selected item by default, as shown in the image below?
a = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"};
New Window( "Test",
testCB = Combo Box( a, )
); Automation and ScriptingRe: Setting Default Selected Item in a Combo BoxHi @BabyDoragon ,
You can use the 'set' function to place it into the position on the list (this has to be the numbered order for the combo box list)
a = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"};
New Window( "Test",
testCB = Combo Box( a, )
);
testcb<<SET></SET>Re: Setting Default Selected Item in a Combo BoxExtending a little on bens solution
Names Default To Here(1);
options = {"1", "2", "3", "4", "5", "6", "7", "8", "9", "0"};
initial_option = "7";
nw = New Window( "Test",
combob = Combo Box(options, << Set(Contains(options, initial_option)))
);
Scripting Index is usually good place to start
