A wxformscrollbar object is a free-standing scrollbar control either vertically or horizontally positioned on the form.
| 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. | ||||||||||
| captureable | boolean |
Specifies whether or not the control events can be captured by the
form when the controlcapture() method is
called.
| ||||||||||
| enabled | boolean | Specifies whether or not the control is enabled. | ||||||||||
| focusable | boolean |
Specifies whether or not the control can have the input focus. For
wxformscrollbar objects this is always
.true
| ||||||||||
| 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 wxformscrollbar object. | ||||||||||
| next | type(wxformcontrol) |
Specifies the next wxformcontrol on the same
form.
| ||||||||||
| ongotfocus | event | An event that is triggered when the scrollbar control receives input focus. The event handling function will receive the following parameters: (wxformscrollbar me[, type(*) reference]). The reference is only passed if it is provided by the user. | ||||||||||
| onlostfocus | event | An event that is triggered when the scrollbar control loses input focus. The event handling function will receive the following parameters: (wxformscrollbar me[, type(*) reference]). The reference is only passed if it is provided by the user. | ||||||||||
| onmouse | event |
An event that is triggered each time a mouse event occurs that
matches the bits set in the onmousemask
property. The onmouse event handling function should be defined as
follows:
| ||||||||||
| onmousemask | integer | Holds the mask that decides which mouse events are captured and sent to the onmouse event handler. | ||||||||||
| onscroll | event |
An event that is triggered every time the scroll position of control
changes. The event handling function will receive the following
parameters: (wxformscrollbar me, string scrolltype[, type(*)
reference]). The reference is only passed if it is provided by the
user. The scrolltype will be one of: "top",
"bottom", "thumbdrop",
"thumbdrag", "pageup",
"pagedown", "lineup", or
"linedown".
| ||||||||||
| orientation | string |
This contains either "v" if the scroll bar is
vertical or "h" if the scroll bar is horizontal.
| ||||||||||
| pagesize | integer | This contains the number of values from the overall range that represent a single page (when clicking in the scroll bar area outside of the thumb itself). This then decides how far the thumb actually moves when a click in these areas occurs. Valid values are from 1 through the size of the range. | ||||||||||
| position | integer | This contains the current position of the thumb in the scroll bar. Valid values are from 0 to range minus thumbsize. | ||||||||||
| range | integer | This contains the range of values, beginning at 0 and ending at range - 1, that describe the granularity of the scroll bar. Valid values are from 1 through 4G. | ||||||||||
| thumbsize | integer | This contains the size of the thumb. The thumb size is normally automatically managed by the relationship between the range, the scrollbar size, and the page size, but this can be overridden. Valid values are from 1 up to the size of the range. | ||||||||||
| tooltip | string | Contains the test 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 wxformscrollbar type object. | ||||||||||
| visible | boolean | Specifies whether or not the control is visible. | ||||||||||
| width | integer | Gives the width of the control, in pixels. |
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.
Sets the color of the control. The wxformscrollbar
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.
wxformscrollbarvar.setbackgroundrgb (
integer ,
integer rgb,
integer red,
integer green )
blue
| 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. |
This method is used to determine whether the events for the control can be captured and passed to the form or not. By default, events can be captured.
Sets the enabled state of the control. The wxformscrollbar object itself is returned, to allow multiple setting methods to be put into one expression.
Sets focus to the control, provided that it is not invisible or disabled. If this is called for a form that is not yet in a container, then nothing will happen except that the focuscontrol of the wxform object will be set. Once the form is placed in a container, the control will get focus and the ongotfocus event will fire.
Sets the name of the scrollbar control. The wxformscrollbar object itself is returned, to allow multiple setting methods to be put into one expression.
| 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.
|
Sets the mask that is used to decide which mouse events will be trapped for the control. The wxformscrollbar object itself is returned, to allow multiple setting methods to be put into one expression.
| Parameter | Default value | Type name | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| onmousemask | None | integer |
The definition of which events should be handled by the
onmouse event handler. The
|
Sets the size and/or position of the control. The wxformscrollbar object itself is returned, to allow multiple setting methods to be put into one expression.
wxformscrollbarvar.setposition (
integer ,
integer left,
integer top,
integer width )
height
| 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. |
Sets various properties of the control. The wxformscrollbar object itself is returned, to allow multiple setting methods to be put into one expression.
wxformscrollbarvar.setscroll (
integer ,
integer range,
integer position,
integer pagesize )
thumbsize
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| range | Current value of the range property | integer | The desired range for the control. |
| position | Current value of the position property | integer | The desired position of the thumb in the scrollbar control. |
| pagesize | Current value of the pagesize property | integer | The desired pagesize for the scrollbar control. |
| thumbsize | Current value of the thumbsize property | integer | The desired thumbsize for the scrollbar control. |
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.
Sets the visibility of the control. The wxformscrollbar object itself is returned, to allow multiple setting methods to be put into one expression.



