Tornadofx: Tooltip doesn't work?

Created on 26 May 2019  路  3Comments  路  Source: edvin/tornadofx

button{
...
tooltip("hello")
}

:octocat: From gitme Android

Most helpful comment

It's impossible to say what you're doing wrong since you don't post a complete code example, but here is one that works:

```kotlin
class MyView : View() {
override val root = stackpane {
setPrefSize(800.0, 600.0)
button("Click me") {
tooltip("Hello")
}
}
}
````

If you don't get a tooltip when you hover and hold the mouse still over the button, I would suspect there is something wrong with your JavaFX version, so try the latest :)

All 3 comments

It's impossible to say what you're doing wrong since you don't post a complete code example, but here is one that works:

```kotlin
class MyView : View() {
override val root = stackpane {
setPrefSize(800.0, 600.0)
button("Click me") {
tooltip("Hello")
}
}
}
````

If you don't get a tooltip when you hover and hold the mouse still over the button, I would suspect there is something wrong with your JavaFX version, so try the latest :)

@edvin thanks,it Worked,Before the mouse didn't stay so long time

:octocat: From gitme Android

Great :)

Was this page helpful?
0 / 5 - 0 ratings