(self, ext_name)
return
Create a frame holding the widgets to configure one extension
Create a frame holding the widgets to configure one extension
Create a frame holding the widgets to configure one extension
def create_extension_frame(self, ext_name):
        """Create a frame holding the widgets to configure one extension"""
        f = VerticalScrolledFrame(self.details_frame, height=250, width=250)
        self.config_frame[ext_name] = f
        entry_area = f.interior
        # Create an entry for each configuration option.
        for row, opt in enumerate(self.extensions[ext_name]):
            # Create a row with a label and entry/checkbutton.
            label = Label(entry_area, text=opt['name'])
            label.grid(row=row, column=0, sticky=NW)
            var = opt['var']
            if opt['type'] == 'bool':
                Checkbutton(entry_area, variable=var,
                            onvalue='True', offvalue='False', width=8
                            ).grid(row=row, column=1, sticky=W, padx=7)
            elif opt['type'] == 'int':
                Entry(entry_area, textvariable=var, validate='key',
                      validatecommand=(self.is_int, '%P'), width=10
                      ).grid(row=row, column=1, sticky=NSEW, padx=7)

            else:  # type == 'str'
                # Limit size to fit non-expanding space with larger font.
                Entry(entry_area, textvariable=var, width=15
                      ).grid(row=row, column=1, sticky=NSEW, padx=7)
        return
def create_extension_frame ( self , ext_name ) : f = VerticalScrolledFrame ( self . details_frame , height = 250 , width = 250 ) self . config_frame [ ext_name ] = f entry_area = f . interior # Create an entry for each configuration option. for row , opt in enumerate ( self . extensions [ ext_name ] ) : # Create a row with a label and entry/checkbutton. label = Label ( entry_area , text = opt [ 'name' ] ) label . grid ( row = row , column = 0 , sticky = NW ) var = opt [ 'var' ] if opt [ 'type' ] == 'bool' : Checkbutton ( entry_area , variable = var , onvalue = 'True' , offvalue = 'False' , width = 8 ) . grid ( row = row , column = 1 , sticky = W , padx = 7 ) elif opt [ 'type' ] == 'int' : Entry ( entry_area , textvariable = var , validate = 'key' , validatecommand = ( self . is_int , '%P' ) , width = 10 ) . grid ( row = row , column = 1 , sticky = NSEW , padx = 7 ) else : # type == 'str' # Limit size to fit non-expanding space with larger font. Entry ( entry_area , textvariable = var , width = 15 ) . grid ( row = row , column = 1 , sticky = NSEW , padx = 7 ) return