Dialog dlg;
DialogGroup dGrp;
DialogField dfGender;
dlg = new Dialog("Enum Dialog");
dGrp = dlg.addGroup("A Group");
dfGender = dlg.addField(enumStr(Gender), "Your Gender");
if (dlg.run())
{
info(dfGender.value());
}
Enums have to be wrapped inside a call to enumStr()
since they are not extended data types. Also the second parameter overrides the default label for the dialog field.