peterbrittain / asciimatics

A cross platform package to do curses-like operations, plus higher level APIs and widgets to create text UIs and ASCII art animations
Apache License 2.0
3.64k stars 238 forks source link

Give Button a .text attribute #300

Closed dwhall closed 3 years ago

dwhall commented 3 years ago

I would like to be able to dynamically update the text a Button displays during run-time.

The alternative is to create a new Button instance with the new text and somehow replace the old button with the new one in the Frame object. I believe it is preferable to make Button behave more like other widgets with a .text attribute.

I have a working prototype based on your previous feedback along with a happy-case-only unit test.

peterbrittain commented 3 years ago

All looked good to me. Thanks!