class main():
def __init__(self):
self.root = tk.Tk()
# Icono
self.notebook=ttk.Notebook(self.root)
self.notebook.pack(fill='both',expand='yes')
# Crear Frames blancos
tab_FBR1=tk.Frame(self.notebook,bg='white') #
tab_FBR2=tk.Frame(self.notebook,bg='white') #
tab_FBR3=tk.Frame(self.notebook,bg='white') #
#ASIGNACIÓN PESTAÑAS FBR1,FBR2 Y FBR3
self.notebook.add(tab_FBR1,text='FBR1') #
self.notebook.add(tab_FBR2,text='FBR2') #
self.notebook.add(tab_FBR3,text='FBR3') #
# Configurations FBR1, FBR2 y FBR3
self.window_FBR(tab_FBR1)
self.window_FBR(tab_FBR2)
self.window_FBR(tab_FBR3)
I want to create 3 windows calling a method called def window_FBR, to create 3 windows with their own variables.
def window_FBR(self,tab):
self.rcolor=tk.IntVar(value=4)
tk.Radiobutton(tab, text="Red", variable=self.rcolor, value=1, command=self.color_rojo(tab),font=("arial",10),bg=('white')).place(x=10,y=70)
However is not working, have you guys have some ideas about how to manage the variables, in the method to create different variables each time I am calling the method?
many thanks
I want to create a GUI in Tkinter with 3 windows. I have a problem because when the variables are created, they did not start with the default value for the self.rcolor=tk.IntVar(value=4)