Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Is there a way to programmatically highlight a ui.SegmentedControl?
-
Is there a way to programmatically highlight a segment of a ui.SegmentedControl?
seg = ui.SegmentedControl() seg.selected_index = 0 # does not set the highlight
See: https://github.com/cclauss/Pythonista_ui/blob/master/segmented_table.py
-
setting selected_index works for me, in the beta. Make sure you actually have some segments defined! setting segments clears the highlight. So just move your line down after you define the segments.
-
Thanks @JonB that works perfectly.