X-Git-Url: http://iramuteq.org/git?p=iramuteq;a=blobdiff_plain;f=dialog.py;h=ec0c6fa1bdaf539a80f231119c608b9ff7588994;hp=8de76bc98a7774ba5cbf9c0154bc40a58899cfad;hb=3c12716d2973bdb4cda7d49cace225d3502c1a30;hpb=0560cfb343605499f157395a8d99a8f2887aad03 diff --git a/dialog.py b/dialog.py index 8de76bc..ec0c6fa 100755 --- a/dialog.py +++ b/dialog.py @@ -1739,6 +1739,7 @@ class OptLexi(wx.Dialog): self.label = wx.StaticText(self, -1, _(u"Minimum frequency").decode('utf8')) self.spin = wx.SpinCtrl(self, -1, min = 1, max = 10000, initial = 10) self.Bind(wx.EVT_CHOICE, self.onselect, self.choice) + self.Bind(wx.EVT_LISTBOX, self.onchoose, self.list_box_1) self.__set_properties() self.__do_layout() # end wxGlade @@ -1750,6 +1751,7 @@ class OptLexi(wx.Dialog): self.spin.SetValue(10) self.choice.SetSelection(0) self.choice_indice.SetSelection(0) + self.button_1.Enable(False) #self.SetMinSize(wx.Size(300, 400)) # end wxGlade @@ -1789,7 +1791,18 @@ class OptLexi(wx.Dialog): else : for et in self.listet : self.list_box_1.Append(et) - + + def onchoose(self, evt): + if self.choice.GetSelection()== 0 : + if len(self.list_box_1.GetSelections()) > 0 : + self.button_1.Enable(True) + else : + self.button_1.Enable(False) + elif self.choice.GetSelection() == 1 : + if len(self.list_box_1.GetSelections()) > 1 : + self.button_1.Enable(True) + else : + self.button_1.Enable(False) class PrefDendro ( wx.Dialog ):