[FXML] Scrollpane filled by titlepanes. TitlePane filled by TilePane. (Changing container size due to changing element inside)

i've got following problems.

  1. How, in FXML, put for ex. 3 TitlePanes into ScrollPane, in such way, that when i open all 3 TitlePanes, the vertical scroll will appear, but when i have for ex. 1 open it disappear? (fit ScrollPane height to it's dynamicaly changing content)

  2. How, in FXML, put TilePane into TitlePane, that TitlePane will fit to it content? For ex. i put 4 Buttons into TilePane. At begining it's 2x2. When i reduce width, it change into 4x1, TilePane heigth grow, but TitlePane doesnt grow with it, and not all Buttons are visible. How to connect TilePane size with its container TitlePane size?

I'll be appriciate for any help.

Answers


If you are using FXML, make sure that you do not set the preferred height of the controls you want to resize, they should be set to COMPUTED. With this set, a collapsed TitledPane will only take up the size of it's title.


Need Your Help

.txt file is no longer written to by snmptrapd daemon after opening and closing with ifstream in c++

c++ linux snmp trap

I am running Net-Snmp (environment is a virtual machine running Linux Mint OS 11) and have configured it to send trap information to a text file that I have called trapd.txt. If I reboot the VM any...

Array push as the first index PHP

php arrays push

I have an array that doesn't use the 0 index. The array starts from 1,2,3. So I would like to add to the array. I tried do array_push($array, "Choose City"), but this ends up at the end of the array,