Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8112464

Base line calculation in GridPane does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • fx2.0
    • fx2.0
    • javafx
    • java.vendor=Sun Microsystems Inc.
      java.version=1.6.0_24
      java.vm.vendor=Sun Microsystems Inc.
      java.vm.version=19.1-b02
      os.name=Windows 7
      os.arch=x86
      os.version=6.1

      JavaFX 2.0ea b18

      I've a hand script font two show the effect: "Edwardian Script ITC" http://designgraphics.org/modules.php?name=Downloads&d_op=getit&lid=103

      Labels and TextBoxes are styled with

      -fx-font: 30pt "Edwardian Script ITC";

      I align the label and textbox with baseline:

          Label labelNode = new Label(label);
          GridPane.setConstraints(labelNode, 0, row);
          GridPane.setHalignment(labelNode, HPos.RIGHT);
          GridPane.setValignment(labelNode, VPos.BASELINE);
          
          TextBox textNode = new TextBox();
          
          GridPane.setConstraints(textNode, 1, row);
          GridPane.setHalignment(textNode, HPos.LEFT);
          GridPane.setValignment(textNode, VPos.BASELINE);
          GridPane.setHgrow(textNode, Priority.ALWAYS);
          GridPane.setColumnSpan(textNode, 2);
          

      In the attachment you can see the wrong baseline alignment.

            amfowler Anne Fowler (Inactive)
            arittnerjfx Aljoscha Rittner (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: