Apr-25-2021, 10:49 PM
(This post was last modified: Apr-25-2021, 10:49 PM by knoxvilles_joker.)
There was an option I was missing: lift().
I did this code and it works:
I did this code and it works:
gun_1 = tk.Button(self, borderwidth=0,bg='black',fg='yellow',disabledforeground='yellow',state=tk.DISABLED,textvariable=self.gun, highlightcolor = 'yellow') self.canvasgun1 = tk.Canvas(self, width=28, height=28, bg='black', highlightthickness=0) self.canvasgun1.grid(row=0, column=0) self.canvasgun1.create_oval(0,0,27,27,outline='yellow') gun_1.lift() gun_2 = tk.Button(self, borderwidth=0,bg='black',fg='yellow',disabledforeground='yellow',state=tk.DISABLED,textvariable=self.gun) self.canvasgun2 = tk.Canvas(self, width=28, height=28, bg='black', highlightthickness=0) self.canvasgun2.grid(row=0, column=7) self.canvasgun2.create_oval(0,0,27,27,outline='yellow') gun_2.lift()Apparently you have to lift the button on top of the canvas as until you initiate that command set, it will stay in the back ground.