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
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
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 ):
class message(wx.Frame):
def __init__(self, parent, items, title, size, save = True, uceids = None):
- wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = title, pos = wx.DefaultPosition, size = size, style = wx.DEFAULT_FRAME_STYLE )
+ wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = title, pos = wx.DefaultPosition, size = size, style = wx.CLOSE_BOX|wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT|wx.TAB_TRAVERSAL )
self.save = save
self.uceids = uceids
- self.ira = wx.GetApp().GetTopWindow()
+ self.ira = wx.GetApp().GetTopWindow()
self.SetIcon(self.ira._icon)
self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
self.items = items
def __del__( self ):
pass
-# class FreqDialog(wx.Dialog):
-# def __init__(self, parent, ID, listcol, title, size) :
-# wx.Dialog.__init__(self, parent, ID, title, size=size, pos=wx.DefaultPosition,style=wx.DEFAULT_DIALOG_STYLE | wx.CANCEL | wx.OK )
-# pre = wx.PreDialog()
-# pre.SetExtraStyle(wx.DIALOG_EX_CONTEXTHELP)
-# pre.Create(parent, ID, title, wx.DefaultPosition, size, wx.DEFAULT_DIALOG_STYLE | wx.CANCEL | wx.OK)
-# self.PostCreate(pre)
-# self.parent = parent
-# sizer = wx.BoxSizer(wx.VERTICAL)
-# #self.content = parent.content
-# self.header = listcol
-# #LABELLIST = []
-# #for i in self.header:
-# # forme = i
-# # if len(forme) > 60 :
-# # LABELLIST.append(i[0:60])
-# # else:
-# # LABELLIST.append(i)
-# self.list_box_1 = wx.ListBox(self, -1, choices=self.header, style=wx.LB_EXTENDED | wx.LB_HSCROLL)
-# sizer.Add(self.list_box_1, 0, 5)
-#
-# btnsizer = wx.BoxSizer(wx.HORIZONTAL)
-#
-# btn = wx.Button(self, wx.ID_CANCEL)
-# btnsizer.Add(btn)
-#
-# btn = wx.Button(self, wx.ID_OK)
-# btn.SetDefault()
-# btnsizer.Add(btn)
-#
-# sizer.Add(btnsizer, 0, wx.ALIGN_CENTER_VERTICAL | wx.ALIGN_CENTER_HORIZONTAL, 5)
-# self.SetSizer(sizer)
-# sizer.Fit(self)
-# self.SetTitle(_(u"Selection").decode('utf8'))
-#
- # end wxGlade
-
-
class FreqDialog ( wx.Dialog ):
def __init__( self, parent, listcol, title, size = wx.Size( -1,-1 ), showNA = True):
class MessageImage(wx.Frame):
def __init__(self, parent, parametres, title, size):
- wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = title, pos = wx.DefaultPosition, size = size, style = wx.DEFAULT_FRAME_STYLE )
+ wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = title, pos = wx.DefaultPosition, size = size, style = wx.CLOSE_BOX|wx.DEFAULT_FRAME_STYLE|wx.FRAME_FLOAT_ON_PARENT|wx.TAB_TRAVERSAL )
+ self.ira = wx.GetApp().GetTopWindow()
+ self.SetIcon(self.ira._icon)
self.SetSizeHintsSz( wx.DefaultSize, wx.DefaultSize )
self.parametres = parametres
self.imageFile = self.parametres['tmpgraph']
if parametres['svg'] == 'TRUE' :
self.imagename = u"image.svg"
else :
- self.imagename = u"iamge.png"
+ self.imagename = u"image.png"
self.HtmlPage = wx.html.HtmlWindow(self, -1)
self.HtmlPage.SetMinSize(size)
if "gtk2" in wx.PlatformInfo: