0
タイトルのように私はsplitPaneを持っている小さなアプリケーションを持っていて、ペインのエッチ部分にはカスタムアイテムを持つ2つのリストビューがあります。問題は、リストビューが大きすぎると、下にスクロールするvertcia barが現れることです...しかし、それはうまくいきません。カスタムリストビュー内のJavaFX SplitPaneは、リストが大きくなるとスクロールしません
は、ここに私のFXMLです:
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.layout.AnchorPane?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="557.0" prefWidth="1012.0" xmlns="http://javafx.com/javafx/9.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<SplitPane fx:id="splitPane" dividerPositions="0.5" layoutX="-8.0" layoutY="35.0" mouseTransparent="true" prefHeight="529.0" prefWidth="1027.0" style="-fx-background-color: #EEEEEE;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="28.0">
<items>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<ListView fx:id="list_todo" layoutY="-8.0" prefHeight="527.0" prefWidth="584.0" style="-fx-padding: 3px;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children>
</AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="160.0" prefWidth="100.0">
<children>
<ListView fx:id="list_done" layoutY="14.0" prefHeight="527.0" prefWidth="420.0" style="-fx-padding: 3px;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
</children></AnchorPane>
</items>
</SplitPane>
<MenuBar prefHeight="30.0" prefWidth="1012.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<menus>
<Menu fx:id="menu_cambiarUser" mnemonicParsing="false" text="Cambiar usuario" />
<Menu mnemonicParsing="false" text="Edit">
<items>
<MenuItem mnemonicParsing="false" text="Delete" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Help">
<items>
<MenuItem mnemonicParsing="false" text="About" />
</items>
</Menu>
</menus>
</MenuBar>
</children>
</AnchorPane>
私は、問題は、私は、セパレータの静止を作るために使用SplitPlabe属性mouseTransparent =「真」であると思います。何が起こっているのか、それをどのように解決するのか?
GUIスレッドで大量のデータをロードしている可能性があります。どのくらいのデータをロードしていますか? – Sedrick
SplitPlane属性mouseTransparent = "true"が問題だったようです。 –
答えを書いてそれを受け入れます。 – Sedrick