Example:
class MarkerColour
{
displayName = $STR_unitMarker_colour_displayName;
tooltip = "Set the marker colour";
property = "Enh_unitMarker_colour";
control = "MarkerColor"; //Vanilla control, unmodified
expression = "_this setVariable ['Enh_unitMarker_colour',_value]";
condition = "objectControllable + objectVehicle";
defaultValue = "colorBLUFOR";
typeName = "STRING";
};
{F33661}
AttributeLoad code (snippet)
if (_value in [parsenumber (_ctrlCombo lbdata _i),_ctrlCombo lbdata _i,_ctrlCombo lbvalue _i]) exitwith {_ctrlCombo lbsetcursel _i;};
To my understanding this iterates through all entries in the combo box and sets the current selected entry to the one that matches the value. On first load this should be the default value.