I use JavaFx
with Scene Builder
, I am new at it, I want to change icon of accordion
and its position, like that image; I find this CSS
, but i couldn't do that;
.titled-pane .title{
-fx-background-radius: 30;
-fx-background-image:url('ac.jpg');
}
it is easy ,just add Hbox to header and set alignement right after that add what you want(Button,ImageView)
<TitledPane animated="false" collapsible="false" contentDisplay="RIGHT" layoutX="900.0" layoutY="500.0" prefHeight="206.0" prefWidth="431.0" stylesheets="@menu.css" text="Message" textFill="WHITE">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="180.0" prefWidth="200.0" />
</content>
<font>
<Font name="Arial Bold" size="12.0" />
</font>
<graphic>
<HBox alignment="TOP_RIGHT" prefHeight="24.0" prefWidth="352.0">
<children>
<ImageView fitHeight="21.0" fitWidth="18.0" pickOnBounds="true" preserveRatio="true" />
</children>
</HBox>
</graphic>
</TitledPane>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.