JavaFX Scene Builder: pointer cursor onMouseOver
Asked Answered
S

3

22

Is it possible to set the mouse cursor to become a pointer (hand) when hovering a Node width JavaFX Scene Builder? How?

Sharilyn answered 6/8, 2013 at 17:7 Comment(0)
V
48

You can add the following Style to the Node in question:

-fx-cursor: hand;

For additional options, check out the JavaFX CSS Documentation

Vulcanize answered 8/8, 2013 at 19:3 Comment(1)
Why haven't I found that myself? Thanks. :)Sharilyn
S
3

for the new one you can use this in your css file

.glyph-icon{
    -fx-fill: White;
}
.glyph-icon:hover{
    -fx-cursor: hand;
    -fx-fill: black;
}

`

Saltandpepper answered 30/6, 2018 at 17:43 Comment(0)
B
1

In the latest Version of Gluon Scene Builder (v11+), this feature is available under the Properties > Cursor with a few other options as well.

The good thing about this feature is that the cursor is updated while you view the options, i.e how will setting that property look like as shown in the below GIF.

enter image description here

Bouffant answered 15/12, 2020 at 10:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.