wxformgauge
Description
A wxformgauge object is a free-standing gauge control horizontally positioned on the form. It can be either a determinate or indeterminate gauge.
Type Tags
wxformcontrol
Object Value
Properties
Property | Type | Description |
---|---|---|
_ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. |
__ | type(*) | This property is provided for use by the user to attach any object of any type to the type in which this property is provided. It has the additional feature of being marked with the resolve keyword, so that object resolution can continue down this property. |
backgroundrgb | rgb | Gives the color of the control. |
focusable | boolean |
Specifies whether or not the control can have the input focus. For
wxformgauge objects this is always
.false
|
form | wxform | Specifies the wxform object to which this control belongs. |
height | integer | Gives the height of the control, in pixels. |
left | integer | Gives the position of the left side of the control relative to the left side of the form, in pixels. |
name | string | The name of the wxformgauge object. |
next | type(wxformcontrol) |
Specifies the next wxformcontrol on the same form.
|
position | integer | This contains the current position in the gauge. Valid values are from 0 to range - 1. |
pulse | boolean | |
range | integer | This contains the range of values, beginning at 0 and ending at range - 1, that describe the granularity of the gauge. Valid values are from 1 through 4G - 1. |
tooltip | string | Contains the text that is displayed as a tooltip for the control. |
top | integer | Gives the position of the top edge of the control relative to the top edge of the form, in pixels. |
type | type | Specifies the wxformgauge type object. |
visible | boolean | Specifies whether or not the control is visible. |
width | integer | Gives the width of the control, in pixels. |
Methods
remove()
Description
Removes the control from the form. If any object has a reference to the control, those references will no longer be valid. It is not safe to attempt to use a control after this method has been called.
Prototype
wxformgaugevar
.remove
()
Parameters
None
setbackgroundrgb()
Description
Sets the background color of the gauge control. The wxformgauge
object itself is returned, to allow multiple setting methods to be
put into one expression. It is an error to specify both the
rgb
argument and one or more of the
red
, green
, or
blue
arguments.
Prototype
wxformgaugevar
.setbackgroundrgb
(
integer
,
integer rgb
,
integer red
,
integer green
)
blue
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
rgb | The current value of the rgb property | integer | The new color of the control. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. |
red | The current value of the rgb.red property | integer | The red component in the new color of the control. This must be between 0 and 255 inclusive. |
green | The current value of the rgb.green property | integer | The green component in the new color of the control. This must be between 0 and 255 inclusive. |
blue | The current value of the rgb.blue property | integer | The blue component in the new color of the control. This must be between 0 and 255 inclusive. |
setgauge()
Description
Sets the type of gauge (determinate or indeterminate). If the range
and position
parameters are sent, the gauge
is set to determinate mode. if the pulse
is passed with a value of
.true
, then the gauge will switch to indeterminate
mode and will pulse one unit. Calling this method again with a
position
parameter will
return it to determinate mode. The wxformgauge object
itself is returned, to allow multiple setting methods to be put into
one expression.
Prototype
wxformgaugevar
.setgauge
(
integer
,
integer range
,
boolean position
)
pulse
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
range | The current value of the range | integer |
The range for the gauge. Must be between 0 and 4G
- 1 .
|
position | The current value of the position | integer |
The current position of the gauge. Must be between 0 and
the value of the range.
|
pulse | The current value of the pulse | boolean |
If set to his sets the gauge to indeterminate or pulse mode. It is recommended
to set the range to some useful value such
as 10 and the position to
0 before calling this method with the
pulse parameter set to
.true . Then each time the
setgauge() method is called with the
pulse parameter set to
.true the gauge will pulse one unit.
|
setname()
Description
Sets the name of the gauge control. The wxformgauge object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgaugevar
.setname
(
string
)
name
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
name | None | string | The new name for the control. |
setnext()
Description
Sets the position of the control in the z-order and tab order.
Prototype
wxformgaugevar
.setnext
(
type(wxformcontrol)
)
next
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
next | None | type(wxformcontrol) |
Calling the method with the value .nul sets a control to be
the last one in the ring (the one before form.firstcontrol) and
so has the highest z-order, and passing any other control as the
argument puts the target control immediately below the one
specified as the parameter. The visible stacking of controls on a
form is such that the earliest in the ring is the furthest back
in the z-order.
|
setposition()
Description
Sets the size and/or position of the control. The wxformgauge object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgaugevar
.setposition
(
integer
,
integer left
,
integer top
,
integer width
)
height
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
left | The current value of the left property | integer | The new position of the left side of the control on the form. |
top | The current value of the top property | integer | The new position of the top edge of the control on the form. |
width | The current value of the width property | integer | The new width of the control on the form. |
height | The current value of the height property | integer | The new height of the control on the form. |
settooltip()
Description
Sets the text for the tooltip associated with the control. The wxformscrollbar object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgaugevar
.settooltip
(
string
)
tooltip
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
tooltip | None | string | The new text to set for the tooltip. |
setvisible()
Description
Sets the visibility of the control. The wxformgauge object itself is returned, to allow multiple setting methods to be put into one expression.
Prototype
wxformgaugevar
.setvisible
(
boolean
)
visible
Parameters
Parameter | Default value | Type name | Description |
---|---|---|---|
visible | None | boolean | The desired visibility of the control. |