Javafx listview disable horizontal scrolling
<p>I'm trying to avoid horizontal scrolling in ListView. The ListView instance holds list of HBox items, each item has a different width.</p>

<p>So far I'm using such a cell factory:</p>

<pre><code>public class ListViewCell extends ListCell&lt;Data&gt;
{
    @Override
    public void updateItem(Data data, boolean empty)
    {
        super.updateItem(data, empty);
        if(empty || data == null){
            setGraphic(null);
            setText(null);
        }
        if(data != null)
        {
            Region region = createRow(data);
            region.prefWidthProperty().bind(mListView.widthProperty().subtract(20));
            region.maxWidthProperty().bind(mListView.widthProperty().subtract(20));
            setGraphic(region);
        }
    }
}
</code></pre>

<p>Unfortunately it is not enough. Usually after adding several items ListView's horizontal scrollbar appears. Even if it seems to be unnecessary.</p>

<p>How can I assure, that ListViewCell will not exceed it's parent width and horizontal scrollbar will not appear?</p>