Skip to content
Discussion options

You must be logged in to vote

Oh, sorry, I meant AbsolutePositionForObject vs CanvasForObject in the first line of OnTapped

Thanks, this code (below) works! It's apparently better than what andydotxyz suggested.

optionsBtn.OnTapped = func() {
	origin := fyne.CurrentApp().Driver().AbsolutePositionForObject(optionsBtn)
	popup := widget.NewPopUpMenu(options, mainWindow.Canvas())
	popup.ShowAtPosition(fyne.NewPos(origin.X, origin.Y + optionsBtn.Size().Height))
}

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
7 replies
@limafresh
Comment options

@dweymouth
Comment options

@limafresh
Comment options

Answer selected by limafresh
@andydotxyz
Comment options

@limafresh
Comment options

@andydotxyz
Comment options

@limafresh
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants