如何在javafx的角上创建带有小箭头的漂亮工具提示? [英] How to create good-looking tooltip with small arrow on the corner in javafx?
本文介绍了如何在javafx的角上创建带有小箭头的漂亮工具提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想创建一个可以以编程方式在所需位置显示的超酷工具提示.
I want to create cool Tooltip that can be displayed programmatically and on desired location.
我已经在javaFx中看到了工具提示,但是我需要弹出带有指向TextField的箭头的漂亮工具提示.
I have seen Tooltips in javaFx but I need to popup nice tooltip that has arrow that points to TextField.
我需要像stackoverflow上那样的工具提示:
I need tooltip like the one on stackoverflow :
也许有人以前做过那件事,或者知道怎么做?
Maybe someone have done that before or know how to do it?
谢谢!
推荐答案
我认为这会对您有所帮助.
i think this would help you.
.tooltip {
-fx-skin: "com.sun.javafx.scene.control.skin.TooltipSkin";
-fx-background-color:
linear-gradient(#cec340, #a59c31),
linear-gradient(#fefefc, #e6dd71),
linear-gradient(#fef592, #e5d848);
-fx-background-insets: 0,1,2;
-fx-background-radius: 0 0 13 0;
-fx-padding: 0.333333em 0.666667em 0.333333em 0.666667em; /* 4 8 4 8 */
-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 8, 0.0 , 0 , 0 );
}
.page-corner {
-fx-padding: 4.5 4.5 4.5 4.5;
-fx-background-color: linear-gradient( from 0% 0% to 50% 50%, #fcf7b6, #a59c31);
-fx-shape: "M0,0H9L0,9Z";
-fx-effect: dropshadow( three-pass-box , rgba(0,0,0,0.6) , 4 , 0.0 , 0 , 0 );
}
这篇关于如何在javafx的角上创建带有小箭头的漂亮工具提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文