
gauge control (version 0.0.36) Copyright 2013  Nelson Hoover - Email: nh@faithfulserver.net

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.

The gauge control is a gauge (or meter) control that can be placed on a form and used to display numeric values. It was written with Gambas 3.4.2 so if you are using an older version of Gambas, you may need to adapt the source code accordingly.

At this point, I consider it to be unfinished and alpha stage, though it should be quite useable in its current state.

Simply open the project with the Gambas IDE and run it to experiment with the properties.
Examine the source of the test form for examples of how to use it.
A brief explanation of some of the properties:

Background - As with all controls, this simply sets the color of the background around the gauge (not the face color).

BackgroundPicture - Allows you to set a picture to be used as the face of the gauge.

BorderColor - The color of the border around the perimeter of the gauge face when no BackgroundPicture is set.

CenterAngleDeg - The angle (in degrees (I'll be adding a version with radians)) on which the scale is centered. 90 degrees is centered on the bottom.

ColorBands - An array of the ColorBand object, which sets the coloring in the scale around the perimeter of the face. The ColorBand is an object for storing Color and Width for each color. Width is from 0 to 1. For example: 0.5 sets a width of half the scale, 0.25 sets a width of one quarter of the scale. The only option when trying to set this property from the GUI designer is 'None', which breaks things, so only set it programmatically. See the project test form for example.

DeadAngleDeg - The angle (in degrees) between the needle stops.

FaceColor - The color of the gauge face if no BackgroundPicture is set.

Font - The font used by the labels (numeric and otherwise) on the gauge face.

Foreground - The font color of the labels.

MajorTicks - The number of major tick marks in the gauge scale, each of which gets numbered based on the gauge scale.

MinorTicks - The number of smaller ticks between each major tick.

MinValue - The minimum of the gauge scale.

MaxValue - The maximum of the gauge scale.

NeedleColor - The color of the gauge needle (or pointer)

Text - The text displayed near CenterAngleDeg. Typically the unit being displayed. e.g. "Volts" or "RPM".

Value - The value indicated by the gauge needle.


Questions or comments can be emailed to Nelson Hoover at nh@faithfulserver.net .

