Vizard 7 » Command Index » Vizard objects » node3d » <node3d:GUI:buttonlabel>.get
7.7

<node3d:GUI:buttonlabel>.get

Tells the button state at the time of calling.

<node3d:GUI:buttonlabel>.get()  

Remarks

This command will return the current state of the button, which can be either viz.DOWN or viz.UP

Return Value

viz.DOWN or viz.UP

Example

button = viz.addButtonLabel("Hello there Bob-O")
button.setPosition(.5,.5)

def myFunction():
    if button.get():
        print("The button is down")
    else:
        print("The button is up")

vizact.ontimer(1,myFunction)