java - JavaFX 8 TabPane - Tab buttons keep getting scrolled out of the viewport of TabPane header -
i got weird issue tabpane
has tab buttons on left. problem present during runtime of applications not in scenebuilder (2.0) preview.
every time selected tab
changes (either user click or changing selectedindex
via code) tabs shift position upwards , out of viewport of tab button area can see in examplary picture below . amount of pixels shifted seems depend on width of tabpane
(the lower width, more shifts) , of time buttons in tabpane
shifted out of viewport.
it possible tab buttons normal position focusing different window or scrolling upwards or downwards in tab button area. once in normal positions they're shifted again when selected tab changes again.
i tried access tabheaderskin
objects (style class "tab") seem runtime objects in tabpane
header area change result of shifting. according scenic view, localy
value changes. however, mytabpane.lookupall(".tab")
finds nothing.
except that, there seems no possibility @ access auto scroll behavior or tab button positions or things that.
edit
here's mcve-fxml
<?import javafx.scene.control.*?> <?import java.lang.*?> <?import javafx.scene.layout.*?> <hbox maxheight="-infinity" maxwidth="-infinity" minheight="-infinity" minwidth="-infinity" prefheight="400.0" prefwidth="20.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"> <children> <tabpane side="left" tabclosingpolicy="unavailable"> <tabs> <tab text="untitled tab 1"> <content> <anchorpane minheight="0.0" minwidth="0.0" prefheight="180.0" prefwidth="200.0" /> </content> </tab> <tab text="untitled tab 2"> <content> <anchorpane minheight="0.0" minwidth="0.0" prefheight="180.0" prefwidth="200.0" /> </content> </tab> <tab text="untitled tab"> <content> <anchorpane minheight="0.0" minwidth="0.0" prefheight="180.0" prefwidth="200.0" /> </content> </tab> <tab text="untitled tab"> <content> <anchorpane minheight="0.0" minwidth="0.0" prefheight="180.0" prefwidth="200.0" /> </content> </tab> </tabs> </tabpane> </children> </hbox>
this looks known bug affecting javafx 8u20. appears fixed in ea release of 8u40.
Comments
Post a Comment