Select to view content in your preferred language

Python Add-In ComboBox refresh Not refreshing.

5123
2
Jump to solution
10-29-2013 11:52 AM
ShaneLim
Deactivated User
I have a combobox that I want to reset the value of after a button has been clicked.
I have tried setting the value with Caps.value = "No" and calling refresh Caps.refresh. 
I have tried setting the selection BreakAwayFlange.onSelChange(BreakAwayFlange.items[0])
But on my screen the combobox stays at whatever value is typed or selected in the combobox.  That actual value has changed and when I call a print statement the new value is shown.   Is there something I need to put into the refresh function within the toolbar?

 class btnRecordMaintenance(object):     """Implementation for Addins_addin.RecordMaintenance (Button)"""     def __init__(self):         self.enabled = True         self.checked = False     def onClick(self):         #List the values that will be added to the table         print Caps.value         # Reset the Values to No         Caps.value = "No"                  Caps.refresh          class cbxCaps(object):     """Implementation for Addins_addin.Caps (ComboBox)"""     def __init__(self):         self.items = ["No", "Yes"]         self.editable = True         self.enabled = True         self.dropdownWidth = 'WWWW'         self.width = 'WWWW'         self.value = "No"     def onSelChange(self, selection):         pass     def onEditChange(self, text):         pass     def onFocus(self, focused):         pass     def onEnter(self):         pass     def refresh(self):         pass
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
JasonScheirer
Esri Alum
Change

Caps.refresh


to

Caps.refresh()

View solution in original post

0 Kudos
2 Replies
JasonScheirer
Esri Alum
Change

Caps.refresh


to

Caps.refresh()
0 Kudos
ShaneLim
Deactivated User
Doh!

Thanks
0 Kudos