(self)
Return frame of widgets for Font tab.

        Fonts: Enable users to provisionally change font face, size, or
        boldness and to see the consequence of proposed choices.  Each
        action set 3 options in changes structuree and changes the
        corresponding aspect of the font sample on this page and
        highlight sample on highlight page.

        Function load_font_cfg initializes font vars and widgets from
        idleConf entries and tk.

        Fontlist: mouse button 1 click or up or down key invoke
        on_fontlist_select(), which sets var font_name.

        Sizelist: clicking the menubutton opens the dropdown menu. A
        mouse button 1 click or return key sets var font_size.

        Bold_toggle: clicking the box toggles var font_bold.

        Changing any of the font vars invokes var_changed_font, which
        adds all 3 font options to changes and calls set_samples.
        Set_samples applies a new font constructed from the font vars to
        font_sample and to highlight_sample on the highlight page.

        Widgets for FontPage(Frame):  (*) widgets bound to self
            frame_font: LabelFrame
                frame_font_name: Frame
                    font_name_title: Label
                    (*)fontlist: ListBox - font_name
                    scroll_font: Scrollbar
                frame_font_param: Frame
                    font_size_title: Label
                    (*)sizelist: DynOptionMenu - font_size
                    (*)bold_toggle: Checkbutton - font_bold
            frame_sample: LabelFrame
                (*)font_sample: Label
Return frame of widgets for Font tab.
Return frame of widgets for Font tab .
def create_page_font(self):
        """Return frame of widgets for Font tab.

        Fonts: Enable users to provisionally change font face, size, or
        boldness and to see the consequence of proposed choices.  Each
        action set 3 options in changes structuree and changes the
        corresponding aspect of the font sample on this page and
        highlight sample on highlight page.

        Function load_font_cfg initializes font vars and widgets from
        idleConf entries and tk.

        Fontlist: mouse button 1 click or up or down key invoke
        on_fontlist_select(), which sets var font_name.

        Sizelist: clicking the menubutton opens the dropdown menu. A
        mouse button 1 click or return key sets var font_size.

        Bold_toggle: clicking the box toggles var font_bold.

        Changing any of the font vars invokes var_changed_font, which
        adds all 3 font options to changes and calls set_samples.
        Set_samples applies a new font constructed from the font vars to
        font_sample and to highlight_sample on the highlight page.

        Widgets for FontPage(Frame):  (*) widgets bound to self
            frame_font: LabelFrame
                frame_font_name: Frame
                    font_name_title: Label
                    (*)fontlist: ListBox - font_name
                    scroll_font: Scrollbar
                frame_font_param: Frame
                    font_size_title: Label
                    (*)sizelist: DynOptionMenu - font_size
                    (*)bold_toggle: Checkbutton - font_bold
            frame_sample: LabelFrame
                (*)font_sample: Label
        """
        self.font_name = tracers.add(StringVar(self), self.var_changed_font)
        self.font_size = tracers.add(StringVar(self), self.var_changed_font)
        self.font_bold = tracers.add(BooleanVar(self), self.var_changed_font)

        # Define frames and widgets.
        frame_font = LabelFrame(self, borderwidth=2, relief=GROOVE,
                                text=' Shell/Editor Font ')
        frame_sample = LabelFrame(self, borderwidth=2, relief=GROOVE,
                                  text=' Font Sample (Editable) ')
        # frame_font.
        frame_font_name = Frame(frame_font)
        frame_font_param = Frame(frame_font)
        font_name_title = Label(
                frame_font_name, justify=LEFT, text='Font Face :')
        self.fontlist = Listbox(frame_font_name, height=15,
                                takefocus=True, exportselection=FALSE)
        self.fontlist.bind('<ButtonRelease-1>', self.on_fontlist_select)
        self.fontlist.bind('<KeyRelease-Up>', self.on_fontlist_select)
        self.fontlist.bind('<KeyRelease-Down>', self.on_fontlist_select)
        scroll_font = Scrollbar(frame_font_name)
        scroll_font.config(command=self.fontlist.yview)
        self.fontlist.config(yscrollcommand=scroll_font.set)
        font_size_title = Label(frame_font_param, text='Size :')
        self.sizelist = DynOptionMenu(frame_font_param, self.font_size, None)
        self.bold_toggle = Checkbutton(
                frame_font_param, variable=self.font_bold,
                onvalue=1, offvalue=0, text='Bold')
        # frame_sample.
        font_sample_frame = ScrollableTextFrame(frame_sample)
        self.font_sample = font_sample_frame.text
        self.font_sample.config(wrap=NONE, width=1, height=1)
        self.font_sample.insert(END, font_sample_text)

        # Grid and pack widgets:
        self.columnconfigure(1, weight=1)
        self.rowconfigure(2, weight=1)
        frame_font.grid(row=0, column=0, padx=5, pady=5)
        frame_sample.grid(row=0, column=1, rowspan=3, padx=5, pady=5,
                          sticky='nsew')
        # frame_font.
        frame_font_name.pack(side=TOP, padx=5, pady=5, fill=X)
        frame_font_param.pack(side=TOP, padx=5, pady=5, fill=X)
        font_name_title.pack(side=TOP, anchor=W)
        self.fontlist.pack(side=LEFT, expand=TRUE, fill=X)
        scroll_font.pack(side=LEFT, fill=Y)
        font_size_title.pack(side=LEFT, anchor=W)
        self.sizelist.pack(side=LEFT, anchor=W)
        self.bold_toggle.pack(side=LEFT, anchor=W, padx=20)
        # frame_sample.
        font_sample_frame.pack(expand=TRUE, fill=BOTH)
def create_page_font ( self ) : self . font_name = tracers . add ( StringVar ( self ) , self . var_changed_font ) self . font_size = tracers . add ( StringVar ( self ) , self . var_changed_font ) self . font_bold = tracers . add ( BooleanVar ( self ) , self . var_changed_font ) # Define frames and widgets. frame_font = LabelFrame ( self , borderwidth = 2 , relief = GROOVE , text = ' Shell/Editor Font ' ) frame_sample = LabelFrame ( self , borderwidth = 2 , relief = GROOVE , text = ' Font Sample (Editable) ' ) # frame_font. frame_font_name = Frame ( frame_font ) frame_font_param = Frame ( frame_font ) font_name_title = Label ( frame_font_name , justify = LEFT , text = 'Font Face :' ) self . fontlist = Listbox ( frame_font_name , height = 15 , takefocus = True , exportselection = FALSE ) self . fontlist . bind ( '<ButtonRelease-1>' , self . on_fontlist_select ) self . fontlist . bind ( '<KeyRelease-Up>' , self . on_fontlist_select ) self . fontlist . bind ( '<KeyRelease-Down>' , self . on_fontlist_select ) scroll_font = Scrollbar ( frame_font_name ) scroll_font . config ( command = self . fontlist . yview ) self . fontlist . config ( yscrollcommand = scroll_font . set ) font_size_title = Label ( frame_font_param , text = 'Size :' ) self . sizelist = DynOptionMenu ( frame_font_param , self . font_size , None ) self . bold_toggle = Checkbutton ( frame_font_param , variable = self . font_bold , onvalue = 1 , offvalue = 0 , text = 'Bold' ) # frame_sample. font_sample_frame = ScrollableTextFrame ( frame_sample ) self . font_sample = font_sample_frame . text self . font_sample . config ( wrap = NONE , width = 1 , height = 1 ) self . font_sample . insert ( END , font_sample_text ) # Grid and pack widgets: self . columnconfigure ( 1 , weight = 1 ) self . rowconfigure ( 2 , weight = 1 ) frame_font . grid ( row = 0 , column = 0 , padx = 5 , pady = 5 ) frame_sample . grid ( row = 0 , column = 1 , rowspan = 3 , padx = 5 , pady = 5 , sticky = 'nsew' ) # frame_font. frame_font_name . pack ( side = TOP , padx = 5 , pady = 5 , fill = X ) frame_font_param . pack ( side = TOP , padx = 5 , pady = 5 , fill = X ) font_name_title . pack ( side = TOP , anchor = W ) self . fontlist . pack ( side = LEFT , expand = TRUE , fill = X ) scroll_font . pack ( side = LEFT , fill = Y ) font_size_title . pack ( side = LEFT , anchor = W ) self . sizelist . pack ( side = LEFT , anchor = W ) self . bold_toggle . pack ( side = LEFT , anchor = W , padx = 20 ) # frame_sample. font_sample_frame . pack ( expand = TRUE , fill = BOTH )