Button

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
NameAccessTypeDescription
NameRead onlystringThe name of the control
TextRead/writestringThe string displayed on the button
Run-time properties common to most controls
PropertyAccessTypeDescription
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 2 comments
  • Siderits
    Reply

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

    • Philip Rowe
      Reply

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

      To change the background colour to blue.
      Cheers
      Phil

Leave a Comment

Start typing and press Enter to search