On Tue, Sep 30, 2008 at 11:57 AM, <[EMAIL PROTECTED]> wrote: > Hi > > I'm facing a problem with the tix combo box in a way that my combo box is > always in an editable mode after I have cleared subwidgets Entry and Listbox > from it. > > > My setup is like this : > > CheckButton1 : > > If this is unset, the combo box should get disabled, the entries in it > should get cleared ( entries are listbox and entry subwidgets) which in my > case they get cleared. > > When this check box is set again, the combo box should get enabled, with no > entries in listbox and entry subwidgets ( which are reallly cleared in my > case.) But the combox box having being enabled is in editable mode despite > of setting it to un-editable mode. > > > The code is as follows: > #Combo Box > self.cbAnalysisLibVersion = Tix.ComboBox(self.frame1, \ > dropdown = True, \ > > command=self.__cllbkAnalysisLibVer, \ > editable=0, \ > variable=verSelection, > options='listbox.height 8\ > listbox.width 25 \ > entry.width 30 \ > entry.anchor w \ > entry.padx 30', \ > history = False) > > > #Check Button box > self.chBtResultsComparison = Checkbutton(self.frame2, \ > text = "Results Comparison", > \ > variable = > varResultsComparison, \ > command = > self.__cllbkResultsComparison) > > def __cllbkResultsComparison(self, Event = None): > > subLB = self.cbAnalysisLibVersion.subwidget("listbox") > subEntry = self.cbAnalysisLibVersion.subwidget("entry") > > if varResultsComparison.get() != 1: > #Disable Tolerance Text Box > > self.txtTolerance.delete(1.0, END) > self.txtTolerance.config(state = DISABLED, \ > bg = "grey") > #Delete all entries (entry & subwidget's entries) > #in Reference Analysis Results Version Combo Box > #and disable this combo box. > > #First Delete the Listbox sub-widget entries > subLB.delete(0, END) > subLB.config(state = DISABLED) > > #Then delete Entry sub-widget entries > #subEntry = self.cbAnalysisLibVersion.subwidget("entry") > subEntry.config(state = NORMAL) > subEntry.delete(0, END) > subEntry.config(state = DISABLED) > > self.cbAnalysisLibVersion.config(state = DISABLED) > #Diable Result Comparison Button > self.btViewComparisonResults.config(state = DISABLED) > > else: > #Check box is ticked > #Enable the Tolerance text box > self.txtTolerance.config(state = NORMAL, \ > bg = "white") > #Enable the Reference Analysis Combo box > #self.cbAnalysisLibVersion.config(state = NORMAL, editable=0) > self.cbAnalysisLibVersion.configure(state = NORMAL, editable = 0) > subLB.config(state = NORMAL) > subEntry.config(state = NORMAL) > > self.btViewComparisonResults.config(state = NORMAL) > > > Please suggest what is that I am missing > > Regards, > Rajat >
Any help guys? -- Regrads, Rajat
-- http://mail.python.org/mailman/listinfo/python-list