Kbase P142867: How to set displayed value and scale programatically for the UltraGauge control ?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/03/2009 |
|
Status: Unverified
GOAL:
How to set displayed value and scale programatically for the UltraGauge control ?
GOAL:
How to change an UltraGauge at runtime ?
FACT(s) (Environment):
OpenEdge 10.2A
Windows
FIX:
To set the properites of the UltraGauge at runtime can be a bit tricky, due to the class hierachy behind the control.
Depending on the type of gauge (linar, radial or digital) used, the class type of the gauge and the collections it uses change.
For the Digital gauge:
The steps to change the value are simple: one can locate the gauge in the UltraGauge:Gauges collection property, and set the Text property to the wanted value.
For the Linear and Radial gauges:
Things are more complicated as these are designed to be usable with multiple scales, and multiple markers per scale.
To change these at runtime, the steps will be:
- Locate the gauge in the UltraGauge:gauges collection.
- Within the gauge, locate the scale that you want to modify.
- Then from the scale, locate the appropriate axis OR marker object. The Axis controls the visible scale including minimum and maximum values, a marker will display an actual value relative to the scale.
- Set the properties as desired.
Note that the properties to be used are NOT part of the Infragistics.Ultragauge.Resources.Gauge class (the type used for the UltraGauge:Gauges collection) , they are defined in the subclasses. This means that after locating the gauge in the UltraGauge:Gauges collection it will need to be cast to the appropriate gauge type.