Closed compilebunny closed 9 months ago
thescreen = tg.Activity(connection,canceloutside=False) layout = tg.LinearLayout(thescreen, horizdivide) testcheckbox = tg.Checkbox(thescreen,"speak",layout,False) testbutton = tg.Button(thescreen, "configuration", layout) testbutton.setlinearlayoutparams(0) testbutton.setheight(tg.View.WRAP_CONTENT) for eventmanager in connection.events(): if eventmanager.type == tg.Event.click and eventmanager.value["id"] == testbutton: print (f"test checkbox state: {testcheckbox.checked}")
testcheckbox.checked does not change according to whether the checkbox is checked or not. In the example above, it always returns false.
You have to call handleevent() on the checkbox with every event so it can filter out its checked events.
handleevent()
testcheckbox.checked does not change according to whether the checkbox is checked or not. In the example above, it always returns false.