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

Button Control does not show graphic until button is pressed when using a bind for the graphic

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • fx1.3
    • fx1.2
    • javafx
    • javafx 1.2-dev, Windows and Solaris

      When using a bind with a graphic, the graphic does not appear until the button is pressed for the first time.

      Example:

      def play = ImageView{...}
      def pause = ImageView {...}

      Button {
                  width: 50
                  height: 50
                  graphic: bind if(paused) play else pause
                  action: function() {
                      paused = not paused;
                  }
              }


      Sample files attached.

        1. ButtonGraphic.fx
          0.9 kB
        2. pause.png
          pause.png
          2 kB
        3. play.png
          play.png
          7 kB

            rbair Richard Bair (Inactive)
            jclarke Jim Clarke (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: