
12.0 Widgets
A widget is a reusable screen object of a graphical user interface that displays an information
arrangement and provides standardized data manipulation. Widgets allow you to create an interactive
user interface that is small, fast and easy!
There are user input widgets and output widgets. Input widgets takes the user input and outputs a result
to the command port. These include the button and slider widget. Most of the input widgets require
touch screen input to be useful and may have limited use for ezLCD-3xx displays with no touchscreen.
Output widgets send out status events when changed to the command port. They usually have an
element that can take a separate input from a widget value command to update just the part of the
widget that shows the value like the needle on the AMETER widget. Control widgets like checkbox,
radio button, and slider will send out status events when changed to the command port. This provides a
faster and more dynamic user interface.
You could program your ezLCD with a startup macro that draws a meter widget in one line and then
your host would only need to send 6 bytes to update the needle position! Button and checkbox widgets
send 3 bytes when a button is pressed/released or checkbox is checked/unchecked. The ezLCD-3xx has
various widgets that simplify the creation of objects on the screen. The CLS command clears all current
widget references. Widgets are powerful in that they can be drawn typically by just issuing the
command followed by the parameters and this can take as little as 11 bytes! Widgets use preset (but
customizable) themes. Widgets that have values like progress bar and meters can be updated by sending
the appropriate widget value command. Every widget has a unique ID and this value should be
different for every widget you use in an application regardless of the type. The current widgets are
Analog Meter, Button, Check Box, Choice, Dial, Digital Meter, Group Box, Progress Bar, Radio
Button, Slider and Static Text.
Your ezLCD-3xx has the ability to display custom-themed buttons. There are 8 preset widget themes
installed that can be used for various button shapes. See
Section 11.0
for more information about
widget themes.
IMPORTANT WIDGET NOTES & ERRATA:
1. You must be sure that the [
Width]
and
[Height]
parameter values fit on your screen or the widget
will not be drawn!
2. Widgets do not support internal fonts at this time.
3. Redraw function not supported so use CLS to clear widgets.
4. Your ezLCD contains documented examples of all the widgets in the \EZSYS\MACROS directory of
its flash drive. The file will have the same name as the command such as DIAL.EZM and
AMETER.EZM.
5. Widget Ids must be a number [1-99] and unique from other widgets.
6
.
Some of the widgets require touch screen input to be useful and may have limited use for ezLCD-3xx
displays with no touchscreen.
7
. If you decide to modify or create a theme remember you need to send the Fontw command before
sending the theme!
32
Summary of Contents for ezLED-3 Series
Page 25: ...25 Dial Choice Digital Meter ...
Page 26: ...26 Progress Bar Radio Button Slider Slider scroll bar option ...
Page 27: ...27 Static Box Framed Static Box ...
Page 66: ...ezLCD 302 240 x 160 4 3 4096 Reflective Color TFT Sunlight Readable NO Touchscreen 66 ...
Page 67: ...Appendix C EarthSEMPL Colors 67 ...
Page 68: ...68 ...
Page 69: ...69 ...
Page 70: ...70 ...
Page 71: ...71 ...
Page 78: ...78 ...