Adding Tapped method to a label in a list alters keyboard behaviour... #6007
-
|
Hello All, I have a list of extended Labels. package main import ( ) var highlightedListItem int = 0 type Lbl struct { } func (lbl *Lbl) Tapped(pe *fyne.PointEvent) { func NewLblWithStyle(text string, alignment fyne.TextAlign, style fyne.TextStyle, tapped func()) *Lbl { func NewLbl(text string, tapped func()) *Lbl { func main() { } Have I neglected to call some base function in my extension or is this a bug of some kind? Thanks for your help... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
I'm guessing this is because interacting with the Label means that the List is no longer focused. |
Beta Was this translation helpful? Give feedback.
-
|
I too found myself extending Label to include Instap although it would have been better (in my case) to have it on the Image widget. |
Beta Was this translation helpful? Give feedback.
I'm guessing this is because interacting with the Label means that the List is no longer focused.
You could work around that by asking the Window canvas to focus the List again after the Label is tapped.
(i.e.
win.Canvas().Focus(theList))