New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add binding.NewStringWithFormat #2890
Comments
Something that might satisfy you need would be binding.NewSprintf that is currently in the developer branch. It take a string like Sprintf, a series of data bindings and provide a string data binding. It will automatically update the content of the string if any of the source data binding change and if the string is set, it will parse it with scanf and update the source data binding accordingly. You can have a look at https://github.com/fyne-io/fyne/blob/develop/data/binding/sprintf.go#L23 . |
Good point @Bluebugs - I wonder if |
@andydotxyz indeed for discoverability and matching developers expectation, might be a good idea to propose |
Resolved with the less attractive but matching name of |
Is your feature request related to a problem? Please describe:
I.e. in my game, I have a word that the user needs to do something with, so I would want to show them something like
"Generated word: $word", instead of just $word
Is it possible to construct a solution with the existing API?
Shouldn't be very hard to implement since we have the same thing for int and floats
Describe the solution you'd like to see:
binding.NewStringWithFormat, working similar to binding.NewIntWithFormat
The text was updated successfully, but these errors were encountered: