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

Tooltip customisation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7u6
    • Fix Version/s: None
    • Component/s: javafx
    • Environment:

      Windows/Ubuntu, eclipse

      Description

      Redefinition of tooltip style using stylesheet works in Java Scene Builder.

      Redefinition of tooltip style at execution in eclipse with the same stylesheet included in FXML file generated from scene builder with

        <stylesheets>
          <URL value="@../style/myCSS.css" />
        </stylesheets>

       does not work (any other property redefinition works).

      Redefinition of tooltip style at execution in eclipse with same stylesheet using code instruction :

         scene.getStylesheets().add(this.getClass().getResource("/style/myCSS.css").toExternalForm());

      works properly.


      Stylesheet used (myCSS.css):

      .tooltip {
        -fx-background-radius: 2 2 2 2;
        -fx-background-color: linear-gradient(#FFFFFF, #DEDEDE);
      }

      .page-corner {
      -fx-shape: " ";
      }

      AnchorPane {
      -fx-background-color: firebrick;
      }



      FXML file used:

      <AnchorPane id="AnchorPane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="91.0" prefWidth="200.0" xmlns:fx="http://javafx.com/fxml">
        <children>
          <Button layoutX="72.0" layoutY="35.0" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" mnemonicParsing="false" text="Button">
            <tooltip>
              <Tooltip text="Tootip Text" />
            </tooltip>
          </Button>
        </children>
        <stylesheets>
          <URL value="@../style/myCSS.css" />
        </stylesheets>
      </AnchorPane>

        Attachments

          Activity

            People

            Assignee:
            msladecek Martin Sládeček
            Reporter:
            duke J. Duke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported: