I have reviewed similar questions ([Using grid\_propagate(False) in Python Tkinter](https://stackoverflow.com/questions/27117101/using-grid-propagatefalse-in-python-tkinter), [tkinter resize label width (grid\_propagate not working)](https://stackoverflow.com/questions/38401426/tkinter-resize-label-width-grid-propagate-not-working)). But I still can't find out why it's not working. My pink labels in the middle are still resizing.
[![enter image description here](https://i.stack.imgur.com/DPhZv.png)](https://i.stack.imgur.com/DPhZv.png)

This is part of my code. Where should I use grid\_propagate?

```
class coursePlan(Frame):
    def __init__(self,master):
        Frame.__init__(self,master)
        self.bgcolor='mint cream'
        self['bg']=self.bgcolor
        self.buttonColor='SeaGreen1'
        self.labelWidth=18
        self.buttonWidth=6
        Label(self,text='Time',relief=FLAT,bg='#00ffff',\
              width=self.buttonWidth,height=1).grid(row=0,column=0,sticky=NSEW)
        self.aweekday=['m','t','w','r','f']
        self.weekday=['Mon','Tue','Wed','Thu','Fri']
        self.time=['{}:{}0'.format((i//2+7)%12+1,[0,3][i%2]) for i in range(24)]
        for i,date in enumerate(self.weekday):
            Label(self,text=date,relief=FLAT,bg='#00{}ff'.format(hex(250-i*25)[2:]),\
              width=self.labelWidth,height=1).grid(row=0,column=i+1,sticky=NSEW)
        for i,time in enumerate(self.time):
            Label(self,text=time,relief=FLAT,bg='#00{}ff'.format(hex(250-i*5)[2:]),\
              width=self.buttonWidth,height=1).grid(row=i+1,column=0,sticky=NSEW)
        self.timeLabel=Label(self,text='Time:')
        self.timeBox=Entry(self)
        self.exampleText='Example: tr12-1:15'
        self.timeBox.bind('<FocusIn>',self.focusIn)
        self.timeBox.bind('<FocusOut>',self.focusOut)
        self.nameLabel=Label(self,text='Name:')
        self.nameBox=Entry(self)
        self.locLabel=Label(self,text='Location:')
        self.locBox=Entry(self)
        self.boxList=[self.timeBox,self.nameBox,self.locBox]
        for i,(box,label) in enumerate(zip(self.boxList,[self.timeLabel,self.nameLabel,self.locLabel])):
            label.configure(anchor='n',\
                            bg='lavender',\
                            bd=0,\
                            height=1,\
                            width=self.labelWidth//2,\
                            relief=FLAT)
            label.grid(row=i,column=6,sticky=NSEW)
            box.configure(bg='lavender',\
                           bd=0,\
                           width=3*self.labelWidth//2,\
                           relief=FLAT)
            box.grid(row=i,column=7,columnspan=2,sticky=NSEW)
            box.bind('<KeyRelease>',self.switch)
        self.setup()
        self.addButton=Button(self,text='Add',command=self.add)
        self.clearButton=Button(self,text='Clear',command=self.clear)
        self.readButton=Button(self,text='Read',command=self.read)
        self.saveButton=Button(self,text='Save',command=self.save)
        self.colorButton=Button(self,text='Color',command=self.switchColor)
        self.fontButton=Button(self,text='Font',command=self.switchFont)
        buttonList=[self.addButton,self.clearButton,self.readButton,self.saveButton,self.colorButton,self.fontButton]
        for i,button in enumerate(buttonList):
            self.configureButton(button)
            button.grid(row=i//2,column=9+i%2,sticky=NSEW)
        Label(self,text='Course List',relief=FLAT,bg='DeepSkyBlue',\
          bd=0,width=2*self.labelWidth,height=1).grid(row=3,column=6,columnspan=3,sticky=NSEW)
        self.read()

    def putLabel(self,datetime,name,loc,mode=0):
        ## part of the code for the pink label
        for weekday in datetime[:weekindex]:
            day=self.weekday[self.aweekday.index(weekday)]
            label=Label(self,text=name+'\n'+loc,bg=self.colorList[0],font=self.fontList[0],\
                        bd=0,width=self.labelWidth,height=grids)
            self.courseLabels[index].append(label)
            label.grid(row=self.time.index(start)+1,column=self.weekday.index(day)+1,rowspan=grids,sticky=NSEW)
            label.grid_propagate(False)

    def switchFont(self):
        self.fontList=self.fontList[1:]+[self.fontList[0]]
        for lst in self.courseLabels:
            for label in lst:
                label['font']=self.fontList[0]

root=Tk()
cp=coursePlan(root)
cp.pack()
root.title('Schedule')
root.mainloop()

```

When I tried self.grid\_propagate(False) in the **init** function, I got this.

[![enter image description here](https://i.stack.imgur.com/WiHWY.png)](https://i.stack.imgur.com/WiHWY.png)

And when I tried root.propagate(False), the size of window is fixed, but the labels in it are still resizing.
[![enter image description here](https://i.stack.imgur.com/j2DDA.png)](https://i.stack.imgur.com/j2DDA.png)
[![enter image description here](https://i.stack.imgur.com/SSMN8.png)](https://i.stack.imgur.com/SSMN8.png)