Base line calculation in GridPane does not work

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • fx2.0
    • Affects Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      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.

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

              Created:
              Updated:
              Resolved:
              Imported: