Fyne API "binding.StringList"

binding.StringList


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

Usage

type StringList

type StringList interface {
	DataList

	Append(value string) error
	Get() ([]string, error)
	GetValue(index int) (string, error)
	Prepend(value string) error
	Remove(value string) error
	Set(list []string) error
	SetValue(index int, value string) error
}

StringList supports binding a list of string values.

Since: 2.0

func BindPreferenceStringList

func BindPreferenceStringList(key string, p fyne.Preferences) StringList

BindPreferenceStringList returns a bound list of string values 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.6

func NewStringList

func NewStringList() StringList

NewStringList returns a bindable list of string values.

Since: 2.0