MegunoLink supports a variety of controls and components that you can use when building a custom interface for your Arduino project. Some controls, such as buttons, will send serial messages to your Arduino when you click them. Others, such as gauges, just display information. Container controls, such as the group box, help you organize your user interface. A few controls, such as the MLPUIMessageProcessor, don’t have a user interface at all. They provide services, such as decoding serial messages you send from the Arduino to set the value of controls on an interface panel.

Most controls are based on WinForms controls. Here we summarize the most useful properties. You can check out Microsoft’s documentation for more detail. Not all controls are supported by MegunoLink yet.

Definitions

  • Control – A control is an object that you can drag onto the Interface Panel you are building.
  • Properties – A property refers to a configurable setting that a control has.
  • Design-time – A design-time property is one that can only be edited using the Interface Panel Designer.
  • Run-time – A run-time property can be edited using the Interface Panel Designer and requested and modified by the Arduino.

Supported Controls

ControlPictureDescription
ButtonSend a serial message when clicked.
Open Web PageOpens a web page in the user’s default browser when clicked.
Open local documentOpens a local file using the default application when clicked.
TextBoxUser can enter text and send this when events occur.
NumericUpDownUser can enter a number or adjust it using the up and down arrows. The result can be sent when events occur such as clicking a button.
Dynamic LabelUse this to display text or numeric information. Text in Dynamic Labels can be adjusted from the Arduino.
LabelUse this to display text or numeric information. This label is fixed. If you want to adjust it from your Arduino use the Dynamic label.
ValueListA pre-defined list of items with names and values. The selected item name or value can be sent when events are raised.
CheckboxThe state of the checkbox can be sent when an event is raised.
RadioButtonRadio buttons are like checkboxes but are used in groups of 2 or more. Only one in a given group can be selected at a time. The state of a radio button can be sent when an event is raised.
TrackBarWithIndicatorA track bar provides a visual control to set a numeric value. The selected number can be sent when an event is raised.
GaugeThe gauge lets you display a value sent from your Arduino on a speedometer style indicator.
ProgressBarA progress bar provides visual feedback to the user on the progress of a task. The value is typically updated by the Arduino.
PictureBoxThe picture box allows you to show bitmap images on the interface. You can show and hide images allowing basic annimation.
TimerThe timer raises periodic events which can send messages to your Arduino.

Control Names

All controls and components have names. These names are used to refer to controls when sending messages, for some controls, for setting property values from a serial device.

A default name is assigned automatically when the control is created but you can change a controls name to make it easier to remember what it is for. Names can include numbers, letters and the underscore (_) character. Names can’t include spaces.

Change control names using the (name) property in the property editor, or with the smart-tag attached to most controls.

Setting control names

Set control names with the smart-tag or property browser. Names can use a-z, A-Z, 0-9 or _. No spaces!

Common Properties

Many properties are common to all controls. They are summarized in the table below. Edit properties by selecting the control in the Designer and use the Properties window to change the property you’re interested in.

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

Leave a Comment

Start typing and press Enter to search