gpt4 book ai didi

JavaFX Accordion 效果

转载 作者:行者123 更新时间:2023-11-28 04:41:40 26 4
gpt4 key购买 nike

我尝试将样式应用到 Accordion Pane ,但遇到了问题。

这行不通。

accordion.setEffect(new DropShadow(BlurType.ONE_PASS_BOX, Color.BLACK, 8, 0, 2, 0));

这个(style.css)也没有用。

.accordion{
-fx-effect: dropshadow( one-pass-box , black , 8 , 0.0 , 2 , 0 );
}

现在看起来是这样的......

enter image description here

但是我想要这个表格 View 下的阴影......

enter image description here

我试图在互联网上搜索解决方案,但我没有找到任何东西!

有人知道怎么做吗?感谢您的回答!

附言

这种变体也不起作用:

.accordion .pane{
-fx-effect: dropshadow( one-pass-box , black , 8 , 0.0 , 2 , 0 );
}

.accordion .titled-pane{
-fx-effect: dropshadow( one-pass-box , black , 8 , 0.0 , 2 , 0 );
}

.accordion .titled-pane .title{
-fx-effect: dropshadow( one-pass-box , black , 8 , 0.0 , 2 , 0 );
}

.accordion .titled-pane > *.content{
-fx-effect: dropshadow( one-pass-box , black , 8 , 0.0 , 2 , 0 );
}

.accordion > .titled-pane > .content{
-fx-effect: dropshadow( one-pass-box , black , 8 , 0.0 , 2 , 0 );
}

最佳答案

Accordion 是一种布局,因此您需要访问您希望更改的此布局的组件(content/titled-pane/title),最明显的是 titled-pane。正如之前在另一个问题中提到的,这里James_D answer , 并引用 Documentation 中的 Accordion 构建.

关于JavaFX Accordion 效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41172034/

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