@@ -82,7 +82,7 @@ def optionmenu_callback(choice):
8282 print ("optionmenu dropdown clicked:" , choice )
8383
8484
85- def radiobutton_event (value , name = "radiobutton" ):
85+ def create_radio_button_callback (value , name = "radiobutton" ):
8686 def radio_button_callback ():
8787 print (f"{ name } toggled, current value:" , value .get ())
8888
@@ -103,7 +103,7 @@ def radio_button_callback():
103103)
104104ctk_label_config .grid (row = 0 , column = 0 , columnspan = 2 , padx = 20 , pady = 20 )
105105is_dir = tk .BooleanVar (value = True )
106- callback_radio_config = radiobutton_event (is_dir , name = "is_dir" )
106+ callback_radio_config = create_radio_button_callback (is_dir , name = "is_dir" )
107107ctk_radio_config_0 = customtkinter .CTkRadioButton (
108108 app ,
109109 text = "Use config" ,
@@ -147,13 +147,12 @@ def radio_button_callback():
147147)
148148report_dropdown .grid (row = 4 , column = 0 , columnspan = 2 , padx = 20 , pady = 20 )
149149
150- _report_type = report_dropdown .get ()
151- print ("report_type value:" , _report_type )
152-
153150##########################################################################################
154151# Run Streamlit radio button
155152run_streamlit = tk .BooleanVar (value = True )
156- callback_radio_st_run = radiobutton_event (run_streamlit , name = "run_streamlit" )
153+ callback_radio_st_run = create_radio_button_callback (
154+ run_streamlit , name = "run_streamlit"
155+ )
157156ctk_radio_st_autorun_1 = customtkinter .CTkRadioButton (
158157 app ,
159158 text = "autorun streamlit" ,
0 commit comments