INNER CODE UNIT · Go
label
g3n/g3nd · util/fileselect.go:219
label := selist[0].(*gui.ImageLabel)
text := label.Text()
return filepath.Join(fs.path, text)
}
// SetFileFilters sets filters for file names which should be shown.
// Each filter must be a valid regular expression.
func (fs *FileSelect) SetFileFilters(filter ...string) {
for _, f := range filter {
fs.fileFilters = append(fs.fileFilters, f)
}
}
func (fs *FileSelect) onSelect() {
// Get selected image label and its txt
sel := fs.list.Selected()[0]