2013-02-22 2 views
0

나는 을 Scene Builder과 함께 사용합니다. 새로운 것이므로 그 이미지와 마찬가지로 accordion 아이콘과 위치를 변경하고 싶습니다. 나는 이것을 발견한다 CSS 그러나 나는 그것을 할 수 없었다;변경 아코디언 아이콘과 위치 JavaFX

.titled-pane .title{ 
-fx-background-radius: 30; 
-fx-background-image:url('ac.jpg'); 
} 

enter image description here

+1

을 원하는 추가 헤더와 그 이후 alignement 권리를 설정 추가 JavaFX에서 TitledPane의 헤더 구성 요소] (http://stackoverflow.com/q/11765436). 아코디언 구성 요소에는 제목이있는 것과 동일한 CSS 선택자가 있습니다 (caspian.css 참조). –

+0

가능한 [JavaFX의 TitledPane에서 헤더 구성 요소를 변경하는 방법] (http://stackoverflow.com/questions/11765436/how-to-change-header-component-in-titledpane-in-javafx) – jewelsea

답변

0

쉽게, 그냥 hbox에 당신이 관련 Q & A [변경하는 방법을 참조하십시오 (버튼, 이미지 뷰)

<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>