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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: fx1.2
    • Fix Version/s: fx1.3
    • Component/s: javafx
    • Labels:
    • Environment:

      javafx 1.2-dev, Windows and Solaris

      Description

      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.

        Attachments

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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: