Open learnbyexample opened 2 weeks ago
I found that using border: none;
prevents the expansion animation. I'd now actually prefer if nothing is changed to the current behavior of using mount
compared to the normal behavior of RadioSet.
Hi @learnbyexample ,
In the source for Radioset you have some processing for the buttons here.
The flickering has to do with the fact that the RadioButtons can have focus.
If initialized with the buttons directly this doesnt happen, i.e. btn.can_focus = False
is set.
I just tested it with your example, If you adjust that, the flickering doesnt occur:
self.dark = False
rb1 = RadioButton('true')
rb1.can_focus = False
self.rset.mount(rb1)
rb2 = RadioButton('false')
rb2.can_focus = False
self.rset.mount(rb2)
have a great day :)
@Zaloog thanks!
Discussed in https://github.com/Textualize/textual/discussions/5213