The button control is used to send commands to a connected device.

Commands are sent when an event, such as the user clicking the button, occurs. Commands are text strings and may include values from other controls such as text boxes or numeric controls.

The label displayed on the button is set using the Text property.

Design-time properties for the Button control
PropertySent when…
OnClickSendThe button is clicked
OnDoubleClickSendThe button is quickly clicked twice
OnMouseDownSendThe mouse button is pressed
OnMouseUpSendThe mouse button is released
Run-time properties for the Button control
NameRead onlystringThe name of the control
TextRead/writestringThe string displayed on the button
Run-time properties common to most controls
VisibleRead/writeboolHide/show the control
EnabledRead/writeboolEnable/disable the control. When a control is disabled it is visible but shown grayed out and you can't interact with it.
ForeColorRead/writestringAdjust the foreground color
BackColorRead/writestringAdjust the background color
Recent Posts
Showing 4 comments
  • Siderits

    Would you please provide syntax for changing background color when called from inside of a function?

    • Philip Rowe

      Hi Richard, for example you can send
      MyPanel.SetBackColor(F(“MyButton”), F(“blue”));

      To change the background colour to blue.

  • Ruben

    i would like my button to change two different variables at the same time.
    Is this possible? and if yes, how would i do that?

    • Philip Rowe

      Hi yes, you would simply add them as multiple arguments. For example you might send !SetVals 56 45/r/n and our command handler would allow you to extract out the 56 and 45 as separate values and apply them to variables.

Leave a Comment

Start typing and press Enter to search