Esempio n. 1
0
 def fillConfiguration(self, configs):
     c = 0
     for i in configs.keys():
         ids = self.page1.add_tab()
         cur = Frame(self.page1.page(ids))
         self.page1.add_page_body(ids, i, cur)
         # self.page1.add(cur)
         # self.page1.tab(c, text=i)
         # curr = Tkinter.Frame(cur.interior)
         # curr.pack(side="top", fill="both", expand=1)
         secs = Notebook(cur)
         secs.pack(side="top", fill="both", expand=1)
         c1 = 0
         subtabs = {}
         for x in configs[i]:
             curr = None
             category = configutils.getValueP(configs[i][x], configutils.category)
             found = False
             for y in subtabs.keys():
                 if y == category:
                     found = True
                     curr = subtabs[category].interior
             if found is False:
                 ids = secs.add_tab()
                 frame = VerticalScrolledFrame(secs.page(ids), background=bg, borderwidth=0, highlightthickness=0)
                 subtabs[category] = frame
                 secs.add_page_body(ids, category, subtabs[category])
                 # secs.tab(subtabs[category], text=category)
                 curr = subtabs[category].interior
             l = Label(curr, text=configutils.getValueP(configs[i][x], configutils.name))
             l.grid(row=c1, sticky=Tkinter.W)
             types = configutils.getValueP(configs[i][x], configutils.types)
             value = configutils.getValueP(configs[i][x], configutils.value)
             choices = configutils.getChoices(types)
             multiple = configutils.getMultipleValues(value)
             if types == configutils.yesno:
                 # v = Tkinter.IntVar()
                 # r = ttk.Radiobutton(curr, text="Yes", variable=v, value=1)
                 # r.grid(row=c1, column=1)
                 # r2 = ttk.Radiobutton(curr, text="No", variable=v, value=2)
                 # r2.grid(row=c1, column=2)
                 r = YesNo(curr, savevar=(i, x), savefunc=self.savefunc)
                 r.grid(row=c1, column=1)
                 r.set(value)
             elif choices is not None and len(choices) > 0:
                 cb = Choice(curr, choices, savevar=(i, x), savefunc=self.savefunc)
                 cb.grid(row=c1, column=1)
                 cb.cb.set(value)
             elif types == configutils.filename:
                 e = FileSelector(curr, savevar=(i, x), savefunc=self.savefunc)
                 e.grid(row=c1, column=1)
                 e.set(value)
             elif types == configutils.multiple:
                 e = Multiple(curr, savevar=(i, x), savefunc=self.savefunc)
                 e.grid(row=c1, column=1)
                 e.set(multiple)
             else:
                 e = Entry(curr, savevar=(i, x), savefunc=self.savefunc)
                 e.grid(row=c1, column=1)
                 e.set(value)
             c1 = c1 + 1
         c = c + 1
Esempio n. 2
0
 def fillConfiguration(self, configs, widget):
     # TODO: Clean this mess, or at least comment it
     l = chr(108)
     v = chr(118)
     for i in configs.keys():
         # If the section is not in the notebook, add it
         if not i in self.configTab.notebook1.__dict__:
             self.configTab.notebook1.__dict__[i] = QtGui.QWidget()
             self.configTab.notebook1.__dict__[
                 i].vlayout = QtGui.QVBoxLayout(
                     self.configTab.notebook1.__dict__[i])
             self.configTab.notebook1.__dict__[i].nbook = QtGui.QTabWidget(
                 self.configTab.notebook1.__dict__[i])
             self.configTab.notebook1.__dict__[i].vlayout.addWidget(
                 self.configTab.notebook1.__dict__[i].nbook)
             self.configTab.notebook1.addTab(
                 self.configTab.notebook1.__dict__[i], i)
         for x in configs[i].keys():
             c = configutils.getValueP(configs[i][x], configutils.category)
             n = configutils.getValueP(configs[i][x], configutils.name)
             t = configutils.getValueP(configs[i][x], configutils.types)
             v_ = configutils.getValue(configs[i][x])
             c_ = configutils.getChoices(t)
             var = (i, x)
             # If the category is not in the section's notebook, add it
             if not c in self.configTab.notebook1.__dict__[i].nbook.__dict__:
                 fw = QtGui.QWidget(
                     self.configTab.notebook1.__dict__[i].nbook)
                 vb = QtGui.QVBoxLayout(fw)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c] = QtGui.QScrollArea(fw)
                 vb.addWidget(
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[c])
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].setWidgetResizable(False)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].flayout = QtGui.QFormLayout()
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].flayout.setSizeConstraint(
                         QtGui.QLayout.SetFixedSize)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].flayout.setFieldGrowthPolicy(
                         QtGui.QFormLayout.AllNonFixedFieldsGrow)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].flayout.setLabelAlignment(QtCore.Qt.AlignLeft)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].flayoutC = QtGui.QWidget()
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].flayoutC.setLayout(
                         self.configTab.notebook1.__dict__[i].nbook.
                         __dict__[c].flayout)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].setWidget(self.configTab.notebook1.__dict__[i].
                                  nbook.__dict__[c].flayoutC)
                 self.configTab.notebook1.__dict__[i].nbook.addTab(fw, c)
             # Add the label
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].__dict__[n] = {}
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].__dict__[n][l] = QtGui.QLabel()
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].__dict__[n][l].setText(n)
             # Add the value
             if t == configutils.yesno:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = ConfigWidget(
                         QtGui.QCheckBox(), var)
                 if configutils.parseBoolean(v_):
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[
                         c].__dict__[n][v].widget.setChecked(True)
             elif c_ is not None and len(c_) > 0:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = ConfigWidget(
                         QtGui.QComboBox(), var)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v].widget.clear()
                 c__ = 0
                 for y in c_:
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[
                         c].__dict__[n][v].widget.addItem(y)
                     if y == v_:
                         self.configTab.notebook1.__dict__[
                             i].nbook.__dict__[c].__dict__[n][
                                 v].widget.setCurrentIndex(c__)
                     c__ += 1
             else:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = ConfigWidget(
                         QtGui.QLineEdit(), var)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v].widget.setText(v_)
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].__dict__[n][v].widget.setSizePolicy(
                     QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding))
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].flayout.addRow(
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[c].
                     __dict__[n][l], self.configTab.notebook1.__dict__[i].
                     nbook.__dict__[c].__dict__[n][v].widget)
Esempio n. 3
0
 def fillConfiguration(self, configs, widget):
     # TODO: Clean this mess, or at least comment it
     l = chr(108)
     v = chr(118)
     for i in configs.keys():
         # If the section is not in the notebook, add it
         if not i in self.configTab.notebook1.__dict__:
             self.configTab.notebook1.__dict__[i] = QtGui.QWidget()
             self.configTab.notebook1.__dict__[i].vlayout = QtGui.QVBoxLayout(
                                                             self.configTab.notebook1.__dict__[i])
             self.configTab.notebook1.__dict__[i].nbook = QtGui.QTabWidget(
                                                             self.configTab.notebook1.__dict__[i])
             self.configTab.notebook1.__dict__[i].vlayout.addWidget(
                                                     self.configTab.notebook1.__dict__[i].nbook)
             self.configTab.notebook1.addTab(self.configTab.notebook1.__dict__[i], i)
         for x in configs[i].keys():
             c = configutils.getValueP(configs[i][x], configutils.category)
             n = configutils.getValueP(configs[i][x], configutils.name)
             t = configutils.getValueP(configs[i][x], configutils.types)
             v_ = configutils.getValue(configs[i][x])
             c_ = configutils.getChoices(t)
             var = (i, x)
             # If the category is not in the section's notebook, add it
             if not c in self.configTab.notebook1.__dict__[i].nbook.__dict__:
                 fw = QtGui.QWidget(self.configTab.notebook1.__dict__[i].nbook)
                 vb = QtGui.QVBoxLayout(fw)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c] = QtGui.QScrollArea(fw)
                 vb.addWidget(self.configTab.notebook1.__dict__[i].nbook.__dict__[c])
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].setWidgetResizable(False)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayout = QtGui.QFormLayout()
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayout.setSizeConstraint(
                                                             QtGui.QLayout.SetFixedSize)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayout.setFieldGrowthPolicy(
                                                     QtGui.QFormLayout.AllNonFixedFieldsGrow)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayout.setLabelAlignment(
                                                                     QtCore.Qt.AlignLeft)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayoutC = QtGui.QWidget()
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayoutC.setLayout(
                         self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayout)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].setWidget(
                         self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayoutC)
                 self.configTab.notebook1.__dict__[i].nbook.addTab(
                                     fw, c)
             # Add the label
             self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n] = {}
             self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][l] = QtGui.QLabel()
             self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][l].setText(n)
             # Add the value
             if t == configutils.yesno:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v] = ConfigWidget(QtGui.QCheckBox(), var)
                 if configutils.parseBoolean(v_):
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.setChecked(True)
             elif c_ is not None and len(c_) > 0:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v] = ConfigWidget(QtGui.QComboBox(), var)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.clear()
                 c__ = 0
                 for y in c_:
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.addItem(y)
                     if y == v_:
                         self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.setCurrentIndex(c__)
                     c__ += 1
             else:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v] = ConfigWidget(QtGui.QLineEdit(), var)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.setText(v_)
             self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.setSizePolicy(
                                 QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding))
             self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayout.addRow(
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][l],
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget)
Esempio n. 4
0
 def fillConfiguration(self, configs, widget):
     # TODO: Clean this mess, or at least comment it
     l = "l"
     v = "v"
     for i in configs.keys():
         # If the section is not in the notebook, add it
         if not i in self.configTab.notebook1.__dict__:
             self.configTab.notebook1.__dict__[i] = QtGui.QWidget()
             self.configTab.notebook1.__dict__[
                 i].vlayout = QtGui.QVBoxLayout(
                     self.configTab.notebook1.__dict__[i])
             self.configTab.notebook1.__dict__[i].nbook = QtGui.QTabWidget(
                 self.configTab.notebook1.__dict__[i])
             self.configTab.notebook1.__dict__[i].vlayout.addWidget(
                 self.configTab.notebook1.__dict__[i].nbook)
             self.configTab.notebook1.addTab(
                 self.configTab.notebook1.__dict__[i], i)
         for c in configutils.getValue(configs[i][configutils.categories]):
             self.addCategory(i, c)
         for x in configs[i].keys():
             if x == configutils.categories:
                 continue
             c = configutils.getValueP(configs[i][x], configutils.category)
             n = configutils.getValueP(configs[i][x], configutils.name)
             t = configutils.getValueP(configs[i][x], configutils.types)
             d = configutils.getValueP(configs[i][x], configutils.desc)
             v_ = configutils.getValue(configs[i][x])
             c_ = configutils.getChoices(t)
             var = (i, x)
             uw = True
             # If the category is not in the section's notebook, add it
             if not c in self.configTab.notebook1.__dict__[i].nbook.__dict__:
                 self.addCategory(i, c)
             # Add the dictionary
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].__dict__[n] = {}
             # Add the label
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].__dict__[n][l] = QtGui.QLabel()
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].__dict__[n][l].setText(n)
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].__dict__[n][l].setToolTip(d)
             # Add the value
             if t == configutils.yesno:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = ConfigWidget(
                         QtGui.QCheckBox(), var)
                 if v_:
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[
                         c].__dict__[n][v].widget.setChecked(True)
             elif c_ is not None and len(c_) > 0:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = ConfigWidget(
                         QtGui.QComboBox(), var)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v].widget.clear()
                 c__ = 0
                 for y in c_:
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[
                         c].__dict__[n][v].widget.addItem(y)
                     if y == v_:
                         self.configTab.notebook1.__dict__[
                             i].nbook.__dict__[c].__dict__[n][
                                 v].widget.setCurrentIndex(c__)
                     c__ += 1
             elif t == configutils.multiple:
                 if not isinstance(v_, list):
                     # Wut?
                     logger.logE(self.tn, logger.E,
                                 _("Something went wrong"))
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = MultipleValues(var)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v].set(v_)
                 uw = False
             elif t == configutils.filename:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = FileName(var)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v].set(v_)
                 uw = False
             else:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = ConfigWidget(
                         QtGui.QLineEdit(), var)
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v].widget.setText(v_)
             #self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.setSizePolicy(
             #                    QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding))
             if uw:
                 p = self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v].widget
             else:
                 p = self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v]
             p.setToolTip(d)
             self.configTab.notebook1.__dict__[i].nbook.__dict__[
                 c].flayout.addRow(
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[c].
                     __dict__[n][l], p)
Esempio n. 5
0
 def fillConfiguration(self, configs, widget):
     # TODO: Clean this mess, or at least comment it
     l = "l"
     v = "v"
     for i in configs.keys():
         # If the section is not in the notebook, add it
         if not i in self.configTab.notebook1.__dict__:
             self.configTab.notebook1.__dict__[i] = QtGui.QWidget()
             self.configTab.notebook1.__dict__[i].vlayout = QtGui.QVBoxLayout(
                 self.configTab.notebook1.__dict__[i])
             self.configTab.notebook1.__dict__[i].nbook = QtGui.QTabWidget(
                 self.configTab.notebook1.__dict__[i])
             self.configTab.notebook1.__dict__[i].vlayout.addWidget(
                 self.configTab.notebook1.__dict__[i].nbook)
             self.configTab.notebook1.addTab(
                 self.configTab.notebook1.__dict__[i], i)
         for c in configutils.getValue(configs[i][configutils.categories]):
             self.addCategory(i, c)
         for x in configs[i].keys():
             if x == configutils.categories:
                 continue
             c = configutils.getValueP(configs[i][x], configutils.category)
             n = configutils.getValueP(configs[i][x], configutils.name)
             t = configutils.getValueP(configs[i][x], configutils.types)
             d = configutils.getValueP(configs[i][x], configutils.desc)
             v_ = configutils.getValue(configs[i][x])
             c_ = configutils.getChoices(t)
             var = (i, x)
             uw = True
             # If the category is not in the section's notebook, add it
             if not c in self.configTab.notebook1.__dict__[i].nbook.__dict__:
                 self.addCategory(i, c)
             # Add the dictionary
             self.configTab.notebook1.__dict__[
                 i].nbook.__dict__[c].__dict__[n] = {}
             # Add the label
             self.configTab.notebook1.__dict__[
                 i].nbook.__dict__[c].__dict__[n][l] = QtGui.QLabel()
             self.configTab.notebook1.__dict__[
                 i].nbook.__dict__[c].__dict__[n][l].setText(n)
             self.configTab.notebook1.__dict__[
                 i].nbook.__dict__[c].__dict__[n][l].setToolTip(d)
             # Add the value
             if t == configutils.yesno:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v] = ConfigWidget(QtGui.QCheckBox(), var)
                 if v_:
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[
                         c].__dict__[n][v].widget.setChecked(True)
             elif c_ is not None and len(c_) > 0:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v] = ConfigWidget(QtGui.QComboBox(), var)
                 self.configTab.notebook1.__dict__[
                     i].nbook.__dict__[c].__dict__[n][v].widget.clear()
                 c__ = 0
                 for y in c_:
                     self.configTab.notebook1.__dict__[i].nbook.__dict__[
                         c].__dict__[n][v].widget.addItem(y)
                     if y == v_:
                         self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.setCurrentIndex(c__)
                     c__ += 1
             elif t == configutils.multiple:
                 if not isinstance(v_, list):
                     # Wut?
                     logger.logE(
                         self.tn, logger.E, _("Something went wrong"))
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[
                     c].__dict__[n][v] = MultipleValues(var)
                 self.configTab.notebook1.__dict__[
                     i].nbook.__dict__[c].__dict__[n][v].set(v_)
                 uw = False
             elif t == configutils.filename:
                 self.configTab.notebook1.__dict__[
                     i].nbook.__dict__[c].__dict__[n][v] = FileName(var)
                 self.configTab.notebook1.__dict__[
                     i].nbook.__dict__[c].__dict__[n][v].set(v_)
                 uw = False
             else:
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v] = ConfigWidget(QtGui.QLineEdit(), var)
                 self.configTab.notebook1.__dict__[
                     i].nbook.__dict__[c].__dict__[n][v].widget.setText(v_)
             #self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][v].widget.setSizePolicy(
             #                    QtGui.QSizePolicy(QtGui.QSizePolicy.Expanding))
             if uw:
                 p = self.configTab.notebook1.__dict__[
                     i].nbook.__dict__[c].__dict__[n][v].widget
             else:
                 p = self.configTab.notebook1.__dict__[
                     i].nbook.__dict__[c].__dict__[n][v]
             p.setToolTip(d)
             self.configTab.notebook1.__dict__[i].nbook.__dict__[c].flayout.addRow(
                 self.configTab.notebook1.__dict__[i].nbook.__dict__[c].__dict__[n][l], p)
Esempio n. 6
0
 def fillConfiguration(self, configs):
     c = 0
     for i in configs.keys():
         ids = self.page1.add_tab()
         cur = Frame(self.page1.page(ids))
         self.page1.add_page_body(ids, i, cur)
         #self.page1.add(cur)
         #self.page1.tab(c, text=i)
         #curr = Tkinter.Frame(cur.interior)
         #curr.pack(side="top", fill="both", expand=1)
         secs = Notebook(cur)
         secs.pack(side = "top", fill = "both", expand = 1)
         c1 = 0
         subtabs = {}
         for x in configs[i]:
             curr = None
             category = configutils.getValueP(configs[i][x], configutils.category)
             found = False
             for y in subtabs.keys():
                 if y == category:
                     found = True
                     curr = subtabs[category].interior
             if found is False:
                 ids = secs.add_tab()
                 frame = VerticalScrolledFrame(secs.page(ids), background = bg, borderwidth = 0,
                                               highlightthickness = 0)
                 subtabs[category] = frame
                 secs.add_page_body(ids, category, subtabs[category])
                 #secs.tab(subtabs[category], text=category)
                 curr = subtabs[category].interior
             l = Label(curr, text = configutils.getValueP(configs[i][x],
                                                        configutils.name))
             l.grid(row = c1, sticky = Tkinter.W)
             types = configutils.getValueP(configs[i][x], configutils.types)
             value = configutils.getValueP(configs[i][x], configutils.value)
             choices = configutils.getChoices(types)
             multiple = configutils.getMultipleValues(value)
             if types == configutils.yesno:
                 #v = Tkinter.IntVar()
                 #r = ttk.Radiobutton(curr, text="Yes", variable=v, value=1)
                 #r.grid(row=c1, column=1)
                 #r2 = ttk.Radiobutton(curr, text="No", variable=v, value=2)
                 #r2.grid(row=c1, column=2)
                 r = YesNo(curr, savevar = (i, x), savefunc = self.savefunc)
                 r.grid(row = c1, column = 1)
                 r.set(configutils.parseBoolean(value))
             elif choices is not None and len(choices) > 0:
                 cb = Choice(curr, choices, savevar = (i, x), savefunc = self.savefunc)
                 cb.grid(row = c1, column = 1)
                 cb.cb.set(value)
             elif types == configutils.filename:
                 e = FileSelector(curr, savevar = (i, x), savefunc = self.savefunc)
                 e.grid(row = c1, column = 1)
                 e.set(value)
             elif types == configutils.multiple:
                 e = Multiple(curr, savevar = (i, x), savefunc = self.savefunc)
                 e.grid(row = c1, column = 1)
                 e.set(multiple)
             else:
                 e = Entry(curr, savevar = (i, x), savefunc = self.savefunc)
                 e.grid(row = c1, column = 1)
                 e.set(value)
             c1 = c1 + 1
         c = c + 1