def __build_tabcontrol(self):
    ''' builds and returns the TabControl for this dialog '''
    
    tabcontrol = TabControl()
    tabcontrol.Location = Point(10, 15)
    tabcontrol.Size = Size(395, 302)
    
    tabcontrol.Controls.Add( self.__build_comicvinetab() )
    tabcontrol.Controls.Add( self.__build_detailstab() )
    tabcontrol.Controls.Add( self.__build_behaviourtab() )
    tabcontrol.Controls.Add( self.__build_datatab() )
    tabcontrol.Controls.Add( self.__build_advancedtab() )
    
    return tabcontrol
    def __build_tabcontrol(self):
        ''' builds and returns the TabControl for this dialog '''

        tabcontrol = TabControl()
        tabcontrol.Location = Point(10, 15)
        tabcontrol.Size = Size(395, 302)

        tabcontrol.Controls.Add(self.__build_comicvinetab())
        tabcontrol.Controls.Add(self.__build_detailstab())
        tabcontrol.Controls.Add(self.__build_behaviourtab())
        tabcontrol.Controls.Add(self.__build_datatab())
        tabcontrol.Controls.Add(self.__build_advancedtab())

        return tabcontrol
Example #3
0
 def init(self):
     # tabs
     tabs = TabControl()
     tabs.Size = Size(580, 700)
     tabs.Location = Point(10, 10)
     # buttons
     ok = Button()
     ok.Text = 'OK'
     ok.DialogResult = DialogResult.OK
     cancel = Button()
     cancel.Text = 'Cancel'
     cancel.DialogResult = DialogResult.Cancel
     buttons = FlowLayoutPanel()
     buttons.FlowDirection = FlowDirection.RightToLeft
     buttons.BorderStyle = BorderStyle.None
     buttons.Controls.Add(cancel)
     buttons.Controls.Add(ok)
     buttons.Size = Size(580, 30)
     buttons.Location = Point(10, 720)
     self.ClientSize = Size(600, 800)
     self.Controls.Add(tabs)
     self.Controls.Add(buttons)
     # pages and tables
     index = 0
     for name in self.settings:
         page = make_page(name, name, index)
         page.TabIndex = index
         settings = self.settings[name]
         table = make_table(name)
         table.ColumnCount = 2
         table.Columns[0].Name = 'Key'
         table.Columns[0].SortMode = DataGridViewColumnSortMode.NotSortable
         table.Columns[0].ReadOnly = True
         table.Columns[
             0].DefaultCellStyle.SelectionBackColor = Color.FromArgb(
                 238, 238, 238)
         table.Columns[0].DefaultCellStyle.BackColor = Color.FromArgb(
             238, 238, 238)
         table.Columns[1].Name = 'Value'
         table.Columns[1].SortMode = DataGridViewColumnSortMode.NotSortable
         keys = sorted(settings.keys())
         for key in keys:
             table.Rows.Add(key, settings[key])
         page.Controls.Add(table)
         tabs.Controls.Add(page)
         self.tables[name] = table
         index += 1