簡體   English   中英

更改展開和折疊圖像TreeView JavaFX 2.2

[英]Change expand and collapse image TreeView JavaFX 2.2

是否可以更改JavaFX 2.2 TreeVIew的展開和折疊圖像?

更改此圖片,

有效的XHTML

對於這樣的圖像(帶+/-),

有效的XHTML

當然,這可能只需要一點點css。 CSS看起來像這樣:

.tree-cell .tree-disclosure-node .arrow {
    -fx-shape: null;
    -fx-background-color: null;
    -fx-background-image: url("plus-arrow.png");
}
.tree-cell:expanded .tree-disclosure-node .arrow {
    -fx-shape: null;
    -fx-background-color: null;
    -fx-background-image: url("minus-arrow.png");
}

lg Kalasch

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM