binding.String
import "fyne.io/fyne/v2/data/binding"Usage
type String
type String = Item[string]String supports binding a string value.
2.0func BindPreferenceString
func BindPreferenceString(key string, p fyne.Preferences) StringBindPreferenceString returns a bindable string value that is managed by the application preferences. Changes to this value will be saved to application storage and when the app starts the previous values will be read.
2.0func BoolToString
func BoolToString(v Bool) StringBoolToString creates a binding that connects a Bool data item to a String. Changes to the Bool will be pushed to the String and setting the string will parse and set the Bool if the parse was successful.
2.0func BoolToStringWithFormat
func BoolToStringWithFormat(v Bool, format string) StringBoolToStringWithFormat creates a binding that connects a Bool data item to a String and is presented using the specified format. Changes to the Bool will be pushed to the String and setting the string will parse and set the Bool if the string matches the format and its parse was successful.
2.0func FloatToString
func FloatToString(v Float) StringFloatToString creates a binding that connects a Float data item to a String. Changes to the Float will be pushed to the String and setting the string will parse and set the Float if the parse was successful.
2.0func FloatToStringWithFormat
func FloatToStringWithFormat(v Float, format string) StringFloatToStringWithFormat creates a binding that connects a Float data item to a String and is presented using the specified format. Changes to the Float will be pushed to the String and setting the string will parse and set the Float if the string matches the format and its parse was successful.
2.0func IntToString
func IntToString(v Int) StringIntToString creates a binding that connects a Int data item to a String. Changes to the Int will be pushed to the String and setting the string will parse and set the Int if the parse was successful.
2.0func IntToStringWithFormat
func IntToStringWithFormat(v Int, format string) StringIntToStringWithFormat creates a binding that connects a Int data item to a String and is presented using the specified format. Changes to the Int will be pushed to the String and setting the string will parse and set the Int if the string matches the format and its parse was successful.
2.0func NewSprintf
func NewSprintf(format string, b ...DataItem) StringNewSprintf returns a String binding that format its content using the format string and the provide additional parameter that must be other data bindings. This data binding use fmt.Sprintf and fmt.Scanf internally and will have all the same limitation as those function.
2.2func NewString
func NewString() StringNewString returns a bindable string value that is managed internally.
2.0func StringToStringWithFormat
func StringToStringWithFormat(str String, format string) StringStringToStringWithFormat creates a binding that converts a string to another string using the specified format. Changes to the returned String will be pushed to the passed in String and setting a new string value will parse and set the underlying String if it matches the format and the parse was successful.
2.2func URIToString
func URIToString(v URI) StringURIToString creates a binding that connects a URI data item to a String. Changes to the URI will be pushed to the String and setting the string will parse and set the URI if the parse was successful.
2.1