Hi, I'm trying to create a wiki entry on how to dynamicly change the Choices and Keys values of a dropdown.
I created a form that contains a textbox, a subclassed dropdownlist, and a button. I'd post the code but currently I'm using postgres for the data to prove everything works. So I doubt it would be much help. In this case I'm using the value in a textbox to change the Choices of a dropdown list. I bind the InteractiveChange of the textbox to a method that calls the dropdown update(). This works very well when I make changes to the textbox value the dropdown.update() changes the Choices, and Keys. IOWs my subclass of dDropdownList calls a method that uses the value in the textbox to get and set the Choices, and Keys. My issue appears if I attempt to use the Form.cancel() to revert back to the old value of the textbox. I use a button to call the cancel routine. It appears the dropdown.update() is called before the old value of the textbox is established in the control. I've tried several ways to force the correct value into the textbox prior to calling my dropdown.update() method without success. I have tried the following: def myCancelBtn(self,evt): self.cancel() dabo.ui.callAfter(my_update_method) or dabo.ui.callAfterInterval( really_long_time, my_update_method) not using Form.cancel(): def myCancelBtn(self,evt): bizobj.cancelAll() call my_update_method self.update() - of course this will call my_update_method for a second time If I push my cancel button twice of course the dropdown returns to the correct old value. Anybody have a suggestion on how I might fix this issue of the cancel(). Johnf _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
