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.
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.