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

Usage

type Int

  type Int = Item[int]
  

Int supports binding a int value.

Since: 2.0

func BindPreferenceInt

  func BindPreferenceInt(key string, p fyne.Preferences) Int
  

BindPreferenceInt returns a bindable int 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 FloatToInt

  func FloatToInt(v Float) Int
  

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

Since: 2.5

func NewInt

  func NewInt() Int
  

NewInt returns a bindable int value that is managed internally.

Since: 2.0

func StringToInt

  func StringToInt(str String) Int
  

StringToInt creates a binding that connects a String data item to a Int. Changes to the String will be parsed and pushed to the Int if the parse was successful, and setting the Int update the String binding.

Since: 2.0

func StringToIntWithFormat

  func StringToIntWithFormat(str String, format string) Int
  

StringToIntWithFormat creates a binding that connects a String data item to a Int and is presented using the specified format. Changes to the Int will be parsed and if the format matches and the parse is successful it will be pushed to the String. Setting the Int will push a formatted value into the String.

Since: 2.0