css - JavaFX remove padding/margin/border from Pane -
i can't seem remove left , right border of gridpane. see picture below.
my fxml file
<?xml version="1.0" encoding="utf-8"?> <?import java.lang.*?> <?import java.util.*?> <?import javafx.scene.*?> <?import javafx.scene.control.*?> <?import javafx.scene.layout.*?> <gridpane alignment="center" maxheight="-infinity" maxwidth="-infinity" minheight="-infinity" minwidth="-infinity" prefheight="600.0" prefwidth="800.0" style="-fx-box-border: transparent;" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/8"> <padding> <javafx.geometry.insets top="0" right="0" left="0" bottom="0"/> </padding> <columnconstraints> <columnconstraints percentwidth="33.0" /> <columnconstraints hgrow="sometimes" minwidth="10.0" percentwidth="33.0" prefwidth="100.0" /> <columnconstraints hgrow="sometimes" minwidth="10.0" percentwidth="33.0" prefwidth="100.0" /> </columnconstraints> <rowconstraints> <rowconstraints minheight="10.0" percentheight="33.0" prefheight="30.0" vgrow="sometimes" /> <rowconstraints minheight="10.0" percentheight="33.0" prefheight="30.0" vgrow="sometimes" /> <rowconstraints minheight="10.0" prefheight="30.0" vgrow="sometimes" /> </rowconstraints> <children> <stackpane prefheight="150.0" prefwidth="200.0" style="-fx-background-color: red;" /> <stackpane prefheight="150.0" prefwidth="200.0" style="-fx-background-color: red;" gridpane.columnindex="2" gridpane.rowindex="1" /> </children> </gridpane> as can see tried setting insets 0, , making border transparent doesn't work.
your problem simple - columns have percentwidth set, total percent adds 99%, not 100%. either change of percentages 33.33..., or else change 1 of them 34% while other 2 remain 33%.
Comments
Post a Comment