diff --git a/main.go b/main.go index c1382a0..5be9ea4 100644 --- a/main.go +++ b/main.go @@ -95,10 +95,10 @@ func main() { return len(currentEntries) }, func() fyne.CanvasObject { - tn := canvas.NewText("Dummy", theme.TextColor()) + tn := canvas.NewText("Dummy", theme.ForegroundColor()) tn.TextStyle.Bold = true - td := canvas.NewText("Dummy", theme.TextColor()) + td := canvas.NewText("Dummy", theme.ForegroundColor()) td.TextSize = theme.TextSize() * 8 / 10 return container.NewHBox( @@ -124,6 +124,7 @@ func main() { l.OnSelected = func(id widget.ListItemID) { currentId = id + w.Canvas().Focus(e) } e.OnChanged = func(s string) { @@ -184,6 +185,9 @@ func main() { } return false } + w.Canvas().SetOnTypedKey(func(event *fyne.KeyEvent) { + e.onKeyTyped(event) + }) w.Canvas().Focus(e)