Fyne API "binding.Float"
binding.Float
import "fyne.io/fyne/v2/data/binding"
Usage
type Float
type Float interface {
DataItem
Get() (float64, error)
Set(float64) error
}
Float supports binding a float64 value.
2.0
func BindPreferenceFloat
func BindPreferenceFloat(key string, p fyne.Preferences) Float
BindPreferenceFloat returns a bindable float64 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.0
func NewFloat
func NewFloat() Float
NewFloat returns a bindable float64 value that is managed internally.
2.0
func StringToFloat
func StringToFloat(str String) Float
StringToFloat creates a binding that connects a String data item to a Float. Changes to the String will be parsed and pushed to the Float if the parse was successful, and setting the Float update the String binding.
2.0
func StringToFloatWithFormat
func StringToFloatWithFormat(str String, format string) Float
StringToFloatWithFormat creates a binding that connects a String data item to a Float and is presented using the specified format. Changes to the Float will be parsed and if the format matches and the parse is successful it will be pushed to the String. Setting the Float will push a formatted value into the String.
2.0