func (i *Item) widgets() (fyne.CanvasObject, fyne.CanvasObject) {
	label := widget.NewLabel(i.Label)
	switch i.Type {
	case Text:
		w := widget.NewEntry()
		w.OnChanged = func(val string) { i.changed(val) }
		w.SetText(i.Val())
		return label, w
	case Password:
		w := widget.NewPasswordEntry()
		w.OnChanged = func(val string) { i.changed(val) }
		w.SetText(i.Val())
		return label, w
	case Select:
		if i.Options == nil || len(i.Options) == 0 {
			i.Options = i.executeTo()
			if i.Options == nil {
				i.Options = make([]string, 0)
			}
		}
		s := widget.NewSelect(i.Options, func(val string) { i.changed(val) })
		s.SetSelected(i.Val())
		return label, s
	case File, Dir, FileOpen, FileSave:
		w := widget.NewEntry()
		w.SetText(i.Val())
		w.OnChanged = func(val string) { i.changed(val) }
		b := widget.NewButton("...", func() { i.getfs_ext(w) })
		// l := container.NewHBox(b, w)
		l := container.New(layout.NewFormLayout(), b, w)
		// l.Resize()
		return label, l
	case Execute, Cancel, Next, Back:
		w := widget.NewButton(i.Todo.Title, i.execute)
		return label, w
		// Cancel  TypeItem = "cancel"
		// Next    TypeItem = "next"
		// Back    TypeItem = "back"
	default:
		return label, label
	}
}
//get the widgets for the items to be rendered in a form layout row
get the widgets for the items to be rendered in a form layout row
// get the widgets for the items to be rendered in a form layout row
func (i *Item) widgets() (fyne.CanvasObject, fyne.CanvasObject) {
	label := widget.NewLabel(i.Label)
	switch i.Type {
	case Text:
		w := widget.NewEntry()
		w.OnChanged = func(val string) { i.changed(val) }
		w.SetText(i.Val())
		return label, w
	case Password:
		w := widget.NewPasswordEntry()
		w.OnChanged = func(val string) { i.changed(val) }
		w.SetText(i.Val())
		return label, w
	case Select:
		if i.Options == nil || len(i.Options) == 0 {
			i.Options = i.executeTo()
			if i.Options == nil {
				i.Options = make([]string, 0)
			}
		}
		s := widget.NewSelect(i.Options, func(val string) { i.changed(val) })
		s.SetSelected(i.Val())
		return label, s
	case File, Dir, FileOpen, FileSave:
		w := widget.NewEntry()
		w.SetText(i.Val())
		w.OnChanged = func(val string) { i.changed(val) }
		b := widget.NewButton("...", func() { i.getfs_ext(w) })
		l := container.New(layout.NewFormLayout(), b, w)
		return label, l
	case Execute, Cancel, Next, Back:
		w := widget.NewButton(i.Todo.Title, i.execute)
		return label, w
	default:
		return label, label
	}
}
func ( i * Item ) widgets ( ) ( fyne . CanvasObject , fyne . CanvasObject ) { label := widget . NewLabel ( i . Label ) switch i . Type { case Text : w := widget . NewEntry ( ) w . OnChanged = func ( val string ) { i . changed ( val ) } w . SetText ( i . Val ( ) ) return label , w case Password : w := widget . NewPasswordEntry ( ) w . OnChanged = func ( val string ) { i . changed ( val ) } w . SetText ( i . Val ( ) ) return label , w case Select : if i . Options == nil || len ( i . Options ) == 0 { i . Options = i . executeTo ( ) if i . Options == nil { i . Options = make ( [ ] string , 0 ) } } s := widget . NewSelect ( i . Options , func ( val string ) { i . changed ( val ) } ) s . SetSelected ( i . Val ( ) ) return label , s case File , Dir , FileOpen , FileSave : w := widget . NewEntry ( ) w . SetText ( i . Val ( ) ) w . OnChanged = func ( val string ) { i . changed ( val ) } b := widget . NewButton ( " " , func ( ) { i . getfs_ext ( w ) } ) l := container . New ( layout . NewFormLayout ( ) , b , w ) return label , l case Execute , Cancel , Next , Back : w := widget . NewButton ( i . Todo . Title , i . execute ) return label , w default : return label , label } }
get the widgets for the items to be rendered in a form layout row
get the widgets for the items to be rendered in a form layout row
// l := container.NewHBox(b, w) // l.Resize() // Cancel  TypeItem = "cancel" // Next    TypeItem = "next" // Back    TypeItem = "back"