_______________________________________________________
BARS Widget
Graphically displays a bank of numeric values
_______________________________________________________
Legal Usage Level-0 Widget: Yes
Parent to: None
Child of: PANEL
Example Image
Example Program
See BARS Widget for a program that creates a BARS widget with one bar similar to the display shown above. This display is similar to a BAR widget, enhanced with some features of the METER widget such as the limits boxes to the left of the bar and the value and label boxes beneath it.
See the following programs for other examples using the BARS widget:
Attributes
Remarks
The BARS widget is a variation of the BAR widget, except that the BARS widgetcan contain several BAR widgets.
If your computer has a monochrome monitor, the BARS widget will handle the situation automatically. There are no attributes related to color to set for that special case. If you have a monochrome monitor, you will automatically get a frame around each single bar.
A frame consists of a border around the single-bar and lines at the LOW LIMIT and HIGH LIMIT values. The frame pen will be the inverse of the background pen. The background pen and the single-bar pen will be the same.
An event can be generated on any or all of the three ranges: "LOW", "MIDDLE", or "HIGH". BARS widget events are level-triggered, not edge-triggered. An event is generated any time a VALUE is within the designated ALARM RANGE, not only when the VALUE transitions from one range to the other. You must specifically set the ALARM TYPE to event before an event can be generated. Otherwise, only beeps are generated.
If you set an event for one of the bars, you set that event for all of the bars in the widget. if an event occurs, you must check all bars to see which bar generated the event. You can set the HIGH, MIDDLE, and LOW limits and the corresponding PEN colors for each individual bar. However, the MAXIMUM and MINIMUM range is the same for all bars.
You cannot individually set the colors for the BACKGROUND and PENS in the LABEL and VALUE boxes for the bars. You cannot turn on LABEL or VALUE boxes for certain bars and not for others.
Events
Events for the BARS widget are:
ALARM
This event is generated when the VALUE attribute is set to a value within one of the ranges named in the ALARM RANGES attribute and the ALARM TYPE is "EVENT".
The only time an ALARM event is generated is when the value of VALUE is set to one, several, or all of the following:
·
|
To or above HIGH LIMIT and the value of ALARM RANGES is "HIGH"
|
·
|
Between LOW LIMIT and HIGH LIMIT and the value of ALARM RANGES is "MIDDLE"
|
·
|
To or below LOW LIMIT and the value of ALARM RANGES is "LOW"
|
Redraw activities, such as changing the ORIENTATION attribute value, will not generate an ALARM event.
SYSTEM MENU
This event is generated when the operator selects items from the SYSTEM MENU.