2
我想創建一個很酷的Tooltip,它可以以編程方式顯示在所需位置。如何用javafx中的小箭頭創建漂亮的工具提示?
我已經在javaFx中看到Tooltips,但我需要彈出漂亮的工具提示,其箭頭指向TextField。
我需要類似工具提示的計算器上的一個:
也許有人已經做了或之前知道該怎麼辦呢?
謝謝!
我想創建一個很酷的Tooltip,它可以以編程方式顯示在所需位置。如何用javafx中的小箭頭創建漂亮的工具提示?
我已經在javaFx中看到Tooltips,但我需要彈出漂亮的工具提示,其箭頭指向TextField。
我需要類似工具提示的計算器上的一個:
也許有人已經做了或之前知道該怎麼辦呢?
謝謝!
我認爲這會對你有幫助。
.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);
}