gpt4 book ai didi

JavaFX 圆 Angular 碰撞箱

转载 作者:行者123 更新时间:2023-11-30 10:22:07 29 4
gpt4 key购买 nike

在我的程序中,我使用 css 设计了我的按钮样式。我正在使用“-fx-background-radius”来圆 Angular ,并注意到当我将鼠标悬停在原来的 Angular 上时,它允许我单击按钮。我只是想知道是否有办法使按钮的“点击框”与您看到的相匹配。

谢谢。

最佳答案

pickOnBounds属性

Defines how the picking computation is done for this node when triggered by a MouseEvent or a contains function call. If pickOnBounds is true, then picking is computed by intersecting with the bounds of this node, else picking is computed by intersecting with the geometric shape of this node.

“边界”本质上是包含节点(在本例中为按钮)的矩形区域。 “几何形状”说明了节点的实际呈现方式。

所以你只需要在按钮上调用setPickOnBounds(false)

关于JavaFX 圆 Angular 碰撞箱,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47461068/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com