add_menu_variable#
- Layout.add_menu_variable(name, values, is_param=False, index=0)#
Add a menu variable.
- Parameters:
- name
str
Variable name.
- values
list
[str
,int
,float
,complex
,Value
] Each element can be any type that can be converted to a
Value
instance.- is_parambool, default:
False
Whether the new variable is a parameter. The default is
False
, which means it is a local variable.- index
int
, default: 0 Index of the value that is initially selected.
- name