I am learning to use tkinter and I have a program which includes Radiobuttons and Entry. These work well if I press buttons and insert text into the appropriate widgets each time I start the program.
I would like to alter the program to use default values at startup so that then all I have to do is press continue if I want to stay with the defaults. From documentation I understood that this can be done using .invoke() for the radiobuttons but when I run this i get the following error at this strip of code:
Can anyone help please?
I would like to alter the program to use default values at startup so that then all I have to do is press continue if I want to stay with the defaults. From documentation I understood that this can be done using .invoke() for the radiobuttons but when I run this i get the following error at this strip of code:
# radio button
button_var = IntVar()
radio_1 = Radiobutton(
text="Windows", variable=button_var, value=1).place(x=15, y=338)
radio_2 = Radiobutton(text="Linux", variable=button_var,
value=2).place(x=115, y=338)
radio_2.invoke()Error:>>> AttributeError: 'NoneType' object has no attribute 'invoke'My intention if for the program to default to the "Linux" option.Can anyone help please?
