Skip to content

Commit

Permalink
Remove reference to TappedSecondary now it is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Jan 20, 2025
1 parent 7e1c29d commit 435458d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions extend/extending-widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,15 @@ func newTappableIcon(res fyne.Resource) *tappableIcon {
We then add new functions to implement the `fyne.Tappable` interface, with
those functions added the new `Tapped` function will be called every time the
user taps our new icon. The interface required has two functions,
`Tapped(*PointEvent)` and `TappedSecondary(*PointEvent)`, so we will add both.
user taps our new icon. The interface required has just one function,
`Tapped(*PointEvent)` and we implement it as follows:

```go
import "log"

func (t *tappableIcon) Tapped(_ *fyne.PointEvent) {
log.Println("I have been tapped")
}

func (t *tappableIcon) TappedSecondary(_ *fyne.PointEvent) {
}
```

We can test this new widget using a simple application as follows.
Expand Down

0 comments on commit 435458d

Please sign in to comment.