I have "configuration page" called displayBox3 with 28 checkboxes (checkbox1 - checkbox2 etc) and 28 sliders (same principal). When checkbox value is "1" slider next to it becomes visible, when it is "0" it becomes invisible. You can check up to 5 checkboxes.
checkbox1 = CheckBox(displayBox3, text= Name[1], grid=[0,0], align = "left", command = check_stat)
slider1 = Slider(displayBox3, end = "200", width=800, grid=[1,0], visible = False)
#etc.
def check_stat():
if checkbox1.value == 1:
slider1.visible = True
if checkbox1.value == 0:
slider1.value = "0"
slider1.visible = False
if checkbox2.value == 1:
slider2.visible = True
if checkbox2.value == 0:
slider2.value = "0"
slider2.visible = False
#etc.
After pressing FinishButton I would like to call a function that checks all checkboxes' values and saves those into a list along with sliders' values so I can use them later on to steer GPIO's in raspberry Pi.
Values1 = {"Value1":"GPIO[i]", "SliderValue1":"Slider[i].Value", "Value2":"GPIO[i]", "SliderValue2":"Slider[i].Value", "Value3":"GPIO[i]", "SliderValue3":"Slider[i].Value", "Value4":"GPIO[i]", "SliderValue4":"Slider[i].Value", "Value5":"GPIO[i]", "SliderValue5":"Slider[i].Value"}
Values2 = {"Value1":"GPIO[i]", "SliderValue1":"Slider[i].Value", "Value2":"GPIO[i]", "SliderValue2":"Slider[i].Value", "Value3":"GPIO[i]", "SliderValue3":"Slider[i].Value", "Value4":"GPIO[i]", "SliderValue4":"Slider[i].Value", "Value5":"GPIO[i]", "SliderValue5":"Slider[i].Value"}
#etc.
I need help with choosing the simplest way to reference those and which method to use to save those and how to recall them later.
Unfortunately the only experience I have is from a decade ago with VBA hence I know how to write conditions but where I lack is the referencing to objects.
Any help would be greatly appreciated, Ideally some referencing article or a link to a ready script so I can understand and reverse engineer it.
Thank you.