IupGauge

Creates a Gauge control. Shows a percent value that can be updated to simulate a progression. It inherits from IupCanvas.

This is an additional control that depends on the CD library. It is included in the IupControls library.

Creation

Ihandle* IupGauge(void); [in C]
iup.gauge{} -> (ih: ihandle) [in Lua]
gauge() [in LED] 

Returns: the identifier of the created element, or NULL if an error occurs.

Attributes

DASHED: Changes the style of the gauge for a dashed pattern. Default is "NO".

FGCOLOR: Controls the gauge and text color. The default is "64 96 192".

FLAT: use a 1 pixel flat border instead of the default 3 pixels sunken border. Can be Yes or No. Default: No. (since 3.21)

FLATCOLOR: color of the border when FLAT=Yes. Default: "164 164 164". (since 3.21)

MAX (non inheritable): Contains the maximum value. Default is "1".

MIN (non inheritable): Contains the minimum value. Default is "0".

PADDING: internal margin. Works just like the MARGIN attribute of the IupHbox and IupVbox containers, but uses a different name to avoid inheritance problems. Default value: "0x0". (since 3.0)

SHOWTEXT: Indicates if the text inside the Gauge is to be shown or not. If the gauge is dashed the text is never shown. Possible values: "YES" or "NO". Default: "YES".

SIZE (non inheritable): The initial size is "120x14". Set to NULL to allow the automatic layout use smaller values.

TEXT (non inheritable): Contains a text to be shown inside the Gauge when SHOW_TEXT=YES. If it is NULL, the percentage calculated from VALUE will be used. If the gauge is dashed the text is never shown.

VALUE (non inheritable): Contains a number between "MIN" and "MAX", controlling the current position.


ACTIVE, BGCOLOR, EXPAND, FONT, SCREENPOSITION, POSITION, MINSIZE, MAXSIZE, WID, TIP, RASTERSIZE, ZORDER, VISIBLE: also accepted. 

Callbacks

MAP_CB, UNMAP_CB, DESTROY_CB: common callbacks are supported.

Examples

Browse for Example Files

iupgauge.png
The Two Types of Gauge

See Also

IupCanvas