Update Fields in Userform Created with SharpDevelop (Python)

Hi

Please reference the userform below. I want to change the values in the userform using python code based on the choice an operator makes when choosing from the combo box on the top of the form. When the user chooses from the list it pulls in new values for some of the fields in the form. I need to repopulate the form with these new values.

I’ve tried for example: “self._num_mbl.Value = newL” (newL being the new value) and it just crashes Rhino.

The code is lengthy so I did not upload it but if you need to see a real example I could construct something simple and upload it. Any help would be greatly appreciated since I am now stalled and cannot go any further.

Eric

UF

I have resolved this issue with the following code to cycle through controls on the form:

#THIS ROUTINE WILL FIND A CONTROL AND UPDATE IT WITH MACRO DEFINED DATA
def UpdateUI(self,cName,cVal):
    for i in self.Controls:
        #Get Type
        fType = type(i)
        #Find Control on Main Form
        #Labels
        if i.Name == cName and fType == Label:
            i.Text = cVal
        #Checkboxes
        if i.Name == cName and fType == CheckBox:
            i.Checked = cVal
        # Numeric UpDown
        if i.Name == cName and fType == NumericUpDown:
            i.Value = cVal
            
        #Find Control in Group Box
        if fType == GroupBox:
            for j in i.Controls:
                #Get Type
                gType = type(j)
                # Numeric UpDown
                if j.Name == cName and gType == NumericUpDown:
                    j.Value = cVal	
                #Labels
                if j.Name == cName and gType == Label:
                    j.Text = cVal	
                #Checkboxes
                if j.Name == cName and gType == CheckBox:
                    j.Checked = cVal