@d-healey Hmm, it didn't work. However, I just realized that I only needed to trigger the ComboIndex, and it worked (as you mentioned initially). Thank you :)
inline function oncmbPolyShape2Control(component, value)
{
Polyshape2.setAttribute(Polyshape2.Mode, ComboIndex[value - 1]);
}