Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Button MouseEvent PointEvent AbsolutePosition return {0 0} #1274

Closed
Claudio08 opened this issue Aug 30, 2020 · 0 comments
Closed

Button MouseEvent PointEvent AbsolutePosition return {0 0} #1274

Claudio08 opened this issue Aug 30, 2020 · 0 comments

Comments

@Claudio08
Copy link

Describe the bug:

Is right that "MouseEvent PointEvent AbsolutePosition return always {0 0}"?

I trap the mouse position on a button widget to retrive the absolute Position of the myButton
using the following function:

Example code:

func (b *myButton) MouseIn(em *desktop.MouseEvent) {
    fmt.Println("MouseEventAbsolutePosition ", em.AbsolutePosition)
    fmt.Println("MouseEventPosition ", em.Position)
    fmt.Println("Button Position() ", b.Position())
    fmt.Println("AbsolutePositionForObject ", fyne.CurrentApp().Driver().AbsolutePositionForObject(b))
}

the result is:
MouseEvent PointEvent AbsolutePosition: return always {0 0}
MouseEvent PointEvent Position: return variable position mouse value example {6 28}
Button Position: return always {0 33}
AbsolutePositionForObject: return the exact position in the window of myButton {4 132}

Device (please complete the following information):

  • OS: [Windows]
  • Version: [10]
  • Go version: [1.14]
  • Fyne version: [1.3.3]
andydotxyz added a commit that referenced this issue Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant