OP 13 February, 2021 - 11:02 PM
(This post was last modified: 13 February, 2021 - 11:54 PM by simoxxh.)
Hey , guys i'm new to tkinter in python , i suck ! litterally xD
im making a gui app , and this is part of my code
I can't figure why the radio buttons doesn't check when i click on it :) !
the program is working as i want ( even tho i know some oof the syntax is crap lol ) my only issue is with the check i cant see it
any help would be apreciated
LoL Fixed I only had to add this " selectcolor='black' " in radiobutton cauz it was white on white , anyway thanks to anyone who gave this some time
XD
im making a gui app , and this is part of my code
Code:
from tkinter import *
root = Tk()
button_frame = Frame(root ,bg="#264653")
button_frame.grid(row=3)
i = 0
var = IntVar(value=1)
check = StringVar(value="1")
list1 = ['40', '50', '60']
def submit2():
global meddose
meddose = check.get()
var.set(1)
return meddose
for obj in list1:
Radiobutton(button_frame, text=str(obj), value=str(obj),
variable=check
, font='Helvetica 12 bold', fg="white", bg="#264653").grid(row=i, pady=5)
i += 1
submitBtn = Button(button_frame, bg='#e76f51', fg="white",
font=('Helvetica', 10, 'bold'), text=" Submit ",
command=submit2)
submitBtn.grid(row=i, column=3, pady=20)
submitBtn.wait_variable(var)
root.mainloop()
I can't figure why the radio buttons doesn't check when i click on it :) !
the program is working as i want ( even tho i know some oof the syntax is crap lol ) my only issue is with the check i cant see it
any help would be apreciated
LoL Fixed I only had to add this " selectcolor='black' " in radiobutton cauz it was white on white , anyway thanks to anyone who gave this some time
XD