Hi all,
I’m trying to move a python/tk app to rust/iced. The app ui has a button which when clicked, added more input widgets to the ui, so the user could dynamically add more of some item. Then a save button would cycle ui children of the container for all values and write it to file.
I’m new to iced, I’m trying to see if iced supports dynamic changes to the ui.
Thanks.
I forgot to add, this also involves removing children widgets from the ui using for eg a button. I looked through iced widget methods for row and container for eg, to see if there is a remove method, but cannot see such.
In Iced you “draw” the entire interface, from scratch, on each invocation of the view
function. You have access to the app’s state in there, so you can make decisions based on it. This means you don’t have to “add” or “remove” widgets, what you do instead is draw an interface with 2 widgets the first time, an interface with 3 widgets the next time, 1 widget the third time, and so on…
1 Like