JavaFXアプリケーションでは、一部のノードがプレビューに表示されますが、選択できず、階層に表示されません。 SceneBuilder untargetable例:SceneBuilderノードを選択できません
この例では、「ファーストネーム」欄は、ターゲッティングではありません、それは「姓」の欄と同じコードを持っているにもかかわらず、階層に表示されません。 "New ..."と "Edit ..."ボタンと同じことです。
My SceneBuilderのバージョンは8.3.0です。 私はeclipseを使用しています。手動で行う必要がある場合はFXGraphでfxmlを編集しています。
FXML:あなたのFXMLでいくつかの場所で
<AnchorPane xmlns:fx="http://javafx.com/fxml" fx:controller="de.is2.address.view.PersonOverviewController" prefHeight="300.0" prefWidth="600.0">
<children>
<SplitPane dividerPositions="0.29797979797979796" layoutX="130.0" layoutY="70.0" prefHeight="300.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<items>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<TableView fx:id="personTable" layoutX="-25.0" layoutY="-21.0" prefHeight="200.0" prefWidth="200.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<columns>
<TableColumn fx:id="firstNameColumn" prefWidth="75.0" text="First Name"/>
</columns>
<columns>
<TableColumn fx:id="lastNameColumn" prefWidth="75.0" text="Last Name"/>
</columns>
<columnResizePolicy><TableView fx:constant="CONSTRAINED_RESIZE_POLICY" /></columnResizePolicy>
</TableView>
</children>
</AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<Label layoutX="54.0" layoutY="37.0" text="Person Details" AnchorPane.leftAnchor="5.0" AnchorPane.topAnchor="5.0"/>
<GridPane layoutX="67.0" layoutY="78.0" AnchorPane.leftAnchor="5.0" AnchorPane.rightAnchor="5.0" AnchorPane.topAnchor="30.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
</columnConstraints>
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</rowConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</rowConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</rowConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</rowConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</rowConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES"/>
</rowConstraints>
<children>
<Label text="First Name"/>
<Label text="Last Name" GridPane.rowIndex="1"/>
<Label text="Street" GridPane.rowIndex="2"/>
<Label text="City" GridPane.rowIndex="3"/>
<Label text="Postal Code" GridPane.rowIndex="4"/>
<Label text="Birthday" GridPane.rowIndex="5"/>
<Label fx:id="firstNameLabel" text="Label" GridPane.columnIndex="1"/>
<Label fx:id="lastNameLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="1"/>
<Label fx:id="streetLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="2"/>
<Label fx:id="cityLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="3"/>
<Label fx:id="postalCodeLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="4"/>
<Label fx:id="birthdayLabel" text="Label" GridPane.columnIndex="1" GridPane.rowIndex="5"/>
</children>
</GridPane>
<ButtonBar layoutX="203.0" layoutY="244.0" prefHeight="39.0" prefWidth="265.0" AnchorPane.bottomAnchor="5.0" AnchorPane.rightAnchor="10.0">
<buttons>
<Button mnemonicParsing="false" text="New..."/>
</buttons>
<buttons>
<Button mnemonicParsing="false" text="Edit..."/>
</buttons>
<buttons>
<Button mnemonicParsing="false" onAction="#handleDeletePerson" text="Delete"/>
</buttons>
</ButtonBar>
</children>
</AnchorPane>
</items>
</SplitPane>
</children>
使用しているSceneBuilderのバージョンはどれですか? GridPaneは61行と13列を表示しますか?あなたは実際にそれらのすべてを持っていますか?あなたがそれを選択すると、GridPaneが表示されますか? –
「LastName」という列はありますが、「First Name」という列はありません。列「LastName」は選択可能ですか? – Kerry
@JoséPeredaMy SceneBuilderのバージョンは8.3.0です。 61行13列は奇妙な未使用コードでしたが、どこから来たのか分かりません。FXGraphを使用しているのかもしれません。 それ以外の場合、グリッドパネルは正常に動作しています。 – Julius