javafx-css

how to solve javafx table-view focused problem?

て烟熏妆下的殇ゞ 提交于 2019-12-12 01:26:23
问题 I have a problem in javafx table view focused problem. This is my table view when unfocused as shown in figure. The table view when focused : But when i am outside of the table view and click show-hide-column button the table does not get focused how to solve this problem using css if possible. or any other tricks....??? 来源: https://stackoverflow.com/questions/53699589/how-to-solve-javafx-table-view-focused-problem

How to change TextArea background color more than once?

一世执手 提交于 2019-12-11 02:34:10
问题 I have a TextArea in my JavaFX program that I want to be able to allow the user to set the background color of. I was able to figure out how to change the background color using an external css file by doing this. .text-area .content { -fx-background-color: blue ; } However, this would only allow me to have a default setting and the user would not be able to select a color from a menu to change it. I also tried doing this in Java code. textArea.setStyle("-fx-background-color: green"); But it

Pane Shape Modification

[亡魂溺海] 提交于 2019-12-08 03:30:47
问题 Ok so to make a long story short I'm trying to create a sort of chat/message system and need a small bit of assistance. I'm trying to create an arrow on my container as the one shown in the image below. The image is taken off of ControlsFX and from their PopOver window. I CANNOT use their popover widget because it behaves a little wonky with what I'm using it for. I went ahead and created my own little chat window popup that positions itself over the parent object that I define but I would

Remove arrow on JavaFX menuButton

左心房为你撑大大i 提交于 2019-12-05 11:06:17
Hi JavaFX Stylesheet expert, How do I remove the default arrow on JavaFX menuButton. I have figured how to change the color and make in unvisible with .menu-button { -fx-mark-color: transparent; } or .menu-button .arrow { -fx-background-color: transparent; } but, I don't want the gap because of the unvisible arrow. Thanks for your advice. Best Regards, Ivan If we look into the source code of MenuButtonSkinBase , the sub structure of MenuButton seems to be MenuButton |——— label (LabeledImpl) |——— arrowButton (StackPane) |——— arrow (StackPane) So to hide the "arrow" it is enough to set padding

JavaFX-CSS: How to “move” style of parent to a child?

妖精的绣舞 提交于 2019-12-04 13:16:30
The trigger for this was a quick experiment to solve TreeItem selection width : the requirement is to highlight only the text, not the whole tree cell. Nothing easier than that (said Frederik :) implement a custom TreeCell with a Label as graphic (and configure the label with the item as needed) remove the selection style (mostly the highlight background from the cell add the highlight style to the label Something like (a runnable example using this is at the end): public static class MyTreeCell extends TreeCell<String> { private Label label; public MyTreeCell() { getStyleClass().add("tree