ccomp

package
v0.0.0-...-59848b6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ListBoxNoneSelected = -1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ListBox

type ListBox struct {
	*cwin.WinBase
	// contains filtered or unexported fields
}

func CreateListBox

func CreateListBox(sys *cwin.Sys, parent cwin.Win, cfg ListBoxCfg) *ListBox

func (*ListBox) GetSelected

func (lb *ListBox) GetSelected() (int, string)

func (*ListBox) SetItems

func (lb *ListBox) SetItems(items []string)

func (*ListBox) SetSelected

func (lb *ListBox) SetSelected(selected int)

func (*ListBox) String

func (lb *ListBox) String() string

type ListBoxCfg

type ListBoxCfg struct {
	cwin.WinCfg
	Items            []string
	SelectedAttr     cwin.Attr
	EnterKeyToSelect bool // if true, only Enter/Return key will cause OnSelect to fire.
	OnSelect         ListBoxOnSelect
}

type ListBoxOnSelect

type ListBoxOnSelect func(idx int, selected string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL