Q:

Python 3 /Tkinter: changing the font type, size, and color of a pre-defined label

I'm using Tkinter with Python 3.6 (Windows 10).  I have a frame on a canvas, and the frame contains a label.  The label properties (i.e., font type, color, size) are to be selected by the user from drop-down menus during use of the GUI.  The initiation of the frame and its label are:
    self.defaultLeftStringValue                     = StringVar()       
    self.defaultRightStringValue                    = StringVar()
    self.leftFrame                                  = tf.TextInFrame(self.main_container, bg = 'white', 
                                                                     height = 128, width = 128)
    self.leftFrame.place( x = 10, y = 10)
    self.leftFrame.pack_propagate(False)
    self.leftLabel                                  = Label(self.leftFrame, textvariable=self.defaultLeftStringValue).pack()

Later, the user has selected the font type, size, and color with another method (doEnter:)
def doEnter(self):

    thisFontSize                                    = self.tkvarFontSize.get()
    thisFontColor                                   = self.tkvarFontFgColor.get()
    thisFontType                                    = self.tkvarFontType.get()
    self.leftFrame.config(bg=self.tkvarFontBgColor.get())
    self.rightFrame.config(bg=self.tkvarFontBgColor.get())
    font                                            = Font( family = thisFontType, size = thisFontSize )
    splitText                                       = self.text_entry.get()

    self.splitTextLeft                              = " "
    self.splitTextRight                             = " "
    if ";" in splitText:
        splitText                                   = splitText.split(";")
        self.splitTextLeft                          = splitText[0]
        self.splitTextRight                         = splitText[1]
        splitTextLeftLength                         = font.measure(self.splitTextLeft)
        splitTextRightLength                        = font.measure(self.splitTextRight)
        splitTextHeight                             = font.metrics("linespace")
        self.defaultLeftStringValue.set(self.splitTextLeft)
        self.defaultRightStringValue.set(self.splitTextRight)

All this works great; the entered text appears in the label of the left and right frames.  I'm even able to change the background color of the frame.  But, I cannot figure out how to change the label properties with thisFontSize (value = 10, type = class int), and thisFontColor (black, class str) and thisFontType (agencyfb, class str).  Hoping that someone can tell me how to change the properties of the text inserted into self.splitTextLeft, etc.

A:

This line assigns None to self.leftLabel. 
self.leftLabel = Label(self.leftFrame, textvariable=self.defaultLeftStringValue).pack()

You can't chain the geometry management methods and retain a reference to the widget. Do these steps separately. In your case you have no reference to the label instance so cannot set its properties later.
To illustrate:
x = tk.Label(root, text="ok").pack()
type(x)
<class 'NoneType'>
x = tk.Label(root, text="ok")
type(x)
<class 'tkinter.Label'>

