import "fyne.io/fyne/v2/data/binding"
  

Usage

type Float

  type Float = Item[float64]
  

Float supports binding a float64 value.

Since: 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.

Since: 2.0

func IntToFloat

  func IntToFloat(val Int) Float
  

IntToFloat creates a binding that connects an Int data item to a Float.

Since: 2.5

func NewFloat

  func NewFloat() Float
  

NewFloat returns a bindable float64 value that is managed internally.

Since: 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.

Since: 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.

Since: 2.0