A wxform object is a single 'page' on which a program creates controls for user interaction. The form is displayed to the user by setting it to be the content of some wxwindow, wxdialog, or other appropriate container.
wxform.new (
integer ,
integer width,
integer height,
type(*) backgroundrgb,
integer cursor )
error
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| width | None | integer | The width of the new form, in pixels. |
| height | None | integer | The height of the new form, in pixels. |
| backgroundrgb | White | integer | The background color of the new form. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. |
| cursor | None | type(*) | The cursor that should be used when the mouse is over the form. |
| error | .nul | integer |
Specifies an object which is used to output any error code
generated during creation of the form1 object. If
error is not specified or is
.nul then any error which occurs during object
creation will halt the program. If an error object is specified and
an error occurs during object creation then the error code is
output into that object and the new()
method returns .nul.
|
| 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 background of the form. | ||||||||||
| container | type(wxcontainer) | Specifies the container object in which this form is currently contained, such as a window or dialog. | ||||||||||
| controlscaptured | boolean | Indicates whether the mouse is currently captured or not. | ||||||||||
| cursor | type(*) | The current type of mouse pointer that is in use. If this is .nul, then the defaults are in use. | ||||||||||
| firstcontrol | type(wxformcontrol) |
Gives the first control on the form, or is .nul
if there are no controls on the form.
| ||||||||||
| firstgraphic | type(wxgraphic) |
Gives the first graphic item on the form, or is
.nul if there are no graphic items on the form.
These include lines, triangles, rectangles, arcs, and ellipses.
| ||||||||||
| focuscontrol | type(wxformcontrol) |
Gives the control on this form which receives user input. For input
to reach the form from the user, it must be in some container (such
as a window) which is active. If no control on the form has focus
then this property is set to .nul.
| ||||||||||
| height | integer | Gives the height of the form, in pixels. | ||||||||||
| mousecaptured | boolean | Indicates whether the mouse is currently captured or not. | ||||||||||
| 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. | ||||||||||
| type | type | Specifies the wxform type object. | ||||||||||
| width | integer | Gives the width of the form, in pixels. |
Creates a new wxformcontrol object of the
specified type, using the given arguments for many of the control's
properties.
wxformvar.addcontrol (
type ,
integer type,
integer left,
integer top,
integer width,
string height,
boolean text,
boolean enabled,
wxbitmap visible,
string bitmap,
wxbitmap scaling,
wxbitmap selectedbitmap,
wxbitmap disabledbitmap,
integer focusbitmap,
integer backgroundrgb,
integer textrgb,
string rgb,
string edittype,
integer selectiontype,
integer rowcount,
integer colcount,
integer rowheight,
boolean colwidth,
boolean rowheightdraggable,
integer colwidthdraggable,
integer rowlabelwidth,
string collabelheight,
string rowlabelalignment,
string collabelalignment,
string alignment,
string editstyle,
integer orientation,
integer range,
integer position,
integer pagesize,
wxfont thumbsize,
wxfont font,
string labelfont,
integer tooltip,
string onmousemask,
type(wxformcontrol) name,
integer next )
error
| Parameter | Default value | Type name | Description | ||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| type | None | type |
The type of the new control. This must be of a type that is
tagged as being a wxformcontrol.
| ||||||||||||||||||||||
| left | None | integer | The position of the left side of the new control on the form, in pixels. The control must be fully contained within the bounds of the form. | ||||||||||||||||||||||
| top | None | integer | The position of the top edge of the new control on the form, in pixels. The control must be fully contained within the bounds of the form. | ||||||||||||||||||||||
| width | None | integer | The width of the new control on the form, in pixels. The control must be fully contained within the form. | ||||||||||||||||||||||
| height | None | integer | The height of the new control on the form, in pixels. The control must be fully contained within the form. | ||||||||||||||||||||||
| text | "" | string | The text for the new control. This does not apply to wxformlist controls; it is an error to supply this argument when creating a wxformlist. | ||||||||||||||||||||||
| enabled | .true | boolean | Whether the new control is enabled or not. | ||||||||||||||||||||||
| visible | .true | boolean | Whether the new control is visible or not. | ||||||||||||||||||||||
| bitmap | None | wxbitmap | The standard bitmap for a wxformbitmapbutton control. | ||||||||||||||||||||||
| scaling | "" | string |
Determines the type of scaling used on the bitmap. This can be
one of: "hfit", "vfit",
"handvfit",
"preserveaspect", or the empty string. If no
scaling is specified, then the image will be cropped to fit the
container as needed. Otherwise the image will be stretched
horizontally to fill the container, vertically to fill the
container, or in both directions.
| ||||||||||||||||||||||
| selectedbitmap | None | wxbitmap | The bitmap for a wxformbitmapbutton control that will be shown when the button is selected. | ||||||||||||||||||||||
| disabledbitmap | None | wxbitmap | The bitmap for a wxformbitmapbutton control that will be shown when the button is disabled. | ||||||||||||||||||||||
| focusbitmap | None | wxbitmap | The bitmap for a wxformbitmapbutton control that will be shown when the button has focus. | ||||||||||||||||||||||
| backgroundrgb | The current background color of the form | integer | The background color of the new control. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. | ||||||||||||||||||||||
| textrgb | Black | integer | The color of the text in the new control. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. | ||||||||||||||||||||||
| rgb | Black | integer | The color of the new wxformsizebox control. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. | ||||||||||||||||||||||
| edittype | "droplist" | string | The style for a new wxformcombo control. It is an error to supply this argument when creating any control type other than a wxformcombo control. Possible values are: "dropedit" and "droplist". | ||||||||||||||||||||||
| selectiontype | "single" | string | The style for a new wxformlist control. It is an error to supply this argument when creating any control type other than a wxformlist control. Possible values are: "single", "multiple" and "extended". | ||||||||||||||||||||||
| rowcount | None | integer | The number of rows for a new wxgrid control. | ||||||||||||||||||||||
| colcount | None | integer | The number of columns for a new wxgrid control. | ||||||||||||||||||||||
| rowheight | None | integer | The default height for a row in a new wxgrid control. | ||||||||||||||||||||||
| colwidth | None | integer | The default width for a column in a new wxgrid control. | ||||||||||||||||||||||
| rowheightdraggable | .true | boolean | Toggle that decides if the user can change the height of the rows. | ||||||||||||||||||||||
| colwidthdraggable | .true | boolean | Toggle that decides if the user can change the width of the columns. | ||||||||||||||||||||||
| rowlabelwidth | 80 | integer | The width of the row label column for a new wxgrid control. | ||||||||||||||||||||||
| collabelheight | 20 | integer | The height of the column label row for a new wxgrid control. | ||||||||||||||||||||||
| rowlabelalignment | right | string |
The alignment for grid row labels. This defaults to
"right", which is centered vertically and then
right-aligned.
| ||||||||||||||||||||||
| collabelalignment | "" | string | The alignment for grid column labels. This defaults to the empty string, which is centered both horizontally and vertically. | ||||||||||||||||||||||
| alignment | "" | string |
The default alignment for grid cells as well as the alignment
for wxformtext and wxformedittext
controls. In the case of a wxformgrid this is
normally the empty string, which is centered both horizontally
and vertically. In the case of a wxformtext or a
wxformedittext control, the default is
.nul, which will be left aligned. Valid values
are: left, right,
top, and bottom. For
wxformtext and wxformedittext controls,
this must be set at creation time and only the horizontal
alignment values are valid. To center something, use the empty
string. For complete information on alignment for grids, see:
the section called “wxformgrid”.
| ||||||||||||||||||||||
| editstyle | "" | string |
This describes the style of wxformedittext control
that is created. This can only be specified at creation time. It
can have any combination of the values:
"hscroll", "multiline",
"password", and "readonly"
whereby password and multiline together will not provide a
password style, but it does not cause an error. The value
"hscroll" by itself may make little
difference, since values that are too large normally scroll
horizontally anyway, and without a definitive size, they appear
to have no function. The "multiline" value
will show a scrollbar if it is needed. It also allows the
entering of new line characters into the textbox. As usual, the
"password" style shows the content as a series
of asterisks and the "readonly" style prevents
modification of the content, but it can be marked and copied to
clipboard.
| ||||||||||||||||||||||
| orientation | None | string |
The orientation for a scrollbar control. Valid values are:
"v" for vertical and "h"
for horizontal scrollbars.
| ||||||||||||||||||||||
| range | 1 | integer | The range for a scrollbar control. | ||||||||||||||||||||||
| position | 0 | integer | The starting position for a scrollbar control. | ||||||||||||||||||||||
| pagesize | None | integer | The size of a page for a scrollbar control. | ||||||||||||||||||||||
| thumbsize | 1 | integer | The size of the thumb in a scrollbar control. | ||||||||||||||||||||||
| font | .nul | wxfont | A valid wxfont object that will be used as the font for associated controls. | ||||||||||||||||||||||
| labelfont | .nul | wxfont | A valid wxfont object that will be used for the row and column labels of a grid control | ||||||||||||||||||||||
| tooltip | .nul | string | The text to be used as the tooltip for the control. | ||||||||||||||||||||||
| onmousemask | None | integer |
The definition of which events should be handled by the
onmouse event handler. The
| ||||||||||||||||||||||
| name | .nul | string | The name of the control. This can be used together with the member operator (!) to access the form control via the wxform object. | ||||||||||||||||||||||
| next | .nul | type(wxformcontrol) |
This determines where in the ring of controls the new control
will be placed. The new control will be created so that the
control specified as next will be after the
new control in the ring. If the next control
is the current firstcontrol for the form, then
the new control will become the new
firstcontrol. If there are already some
controls on the form and next is specified to
be .nul then the next control will be the
current firstcontrol for the form, but the new
control will not become a new firstcontrol
(i.e. it becomes a 'last' control).
| ||||||||||||||||||||||
| error | .nul | integer |
Specifies an object which is used to output any error code
generated during creation of the wxformcontrol
object. If error is not specified or is
.nul then any error which occurs during object
creation will halt the program. If an error object is specified
and an error occurs during object creation then the error code is
output into that object and the addcontrol
method returns .nul.
|
Creates a new type(wxgraphic) object of the specified type, using the given arguments for the graphic's properties. Graphics are always behind all controls in the z-order of the form.
wxformvar.addgraphic (
type ,
point type,
point point1,
point point2,
point point3,
integer midpoint,
integer rgb,
integer borderrgb,
integer width,
boolean borderwidth,
boolean visible,
string bordervisible,
type(wxgraphic) name,
integer next )
error
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| type | None | type |
The type of the new graphic. This must be of a type that is
tagged as being a wxgraphic.
|
| point1 | None | point |
The starting point for the graphic. This can be created inline
using: point.new(10, 10) for example.
|
| point2 | None | point |
The second point of the graphic. This can be created inline
using: point.new(10, 10) for example. Most graphic
types only have two points, such as the line, rectangle, ellipse,
and arc.
|
| point3 | None | point |
This is the third vertex point for a triangle. Currently no
other graphic type makes use of this parameter. This can be
created inline using: point.new(10, 10) for example.
|
| midpoint | None | point |
This point represents the center of an ellipse or arc. This can
be created inline using: point.new(10, 10) for
example.
|
| rgb | White | integer | The fill color of the new wxgraphic object. In the case of the line object, this is the color of the line, in all others the color of the border lines is handled by the borderrgb parameter. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. |
| borderrgb | Black | integer | The color of the lines representing the border of the new wxgraphic object. In the case of the line object, this parameter is invalid, use the rgb parameter instead. It is inadvisable to specify any value for this argument that is not the value of an existing rgb object. |
| width | 1 | integer |
This is the width in pixels of a line object. The minimum value
is 1. To make the line invisible, set its
visibility to .false.
|
| borderwidth | 1 | integer |
This is the width in pixels of the border of a graphic object.
The minimum value is 1. If no border is
desired, set its visibility to .false.
|
| visible | .true | boolean |
Whether the content of the new graphic is visible or not. In the
case of a line object, this decides if the line is visible, in
the case of the other objects, this decides if the object is
filled. If this portion is set to invisible, then objects behind
it will be visible. To set any fillable object (triangle,
rectangle, arc, or ellipse) to be completely invisible, both this
and the bordervisible properties must be set to
.false.
|
| bordervisible | .true | boolean |
Whether the border of the new graphic is visible or not. This
parameter is invalid for line objects. If this portion is set to
invisible, then no border will be shown. If the visible parameter
is also set to .false, then the entrie graphic
will be invisible.
|
| name | .nul | string | The name of the graphic. This can be used together with the member operator (!) to access the graphic on a form via the wxform object. |
| next | .nul | type(wxgraphic) |
This determines where in the ring of graphics the new graphic
will be placed. The new graphic will be created so that the
graphic specified as next will be after the
new graphic in the ring. If the next graphic
is the current firstgraphic for the form, then
the new graphic will become the new
firstgraphic. If there are already some
graphics on the form and next is specified to
be .nul then the next graphic will be the
current firstgraphic for the form, but the new
graphic will not become a new firstgraphic
(i.e. it becomes the 'last' graphic).
|
| error | .nul | integer |
Specifies an object which is used to output any error code
generated during creation of the wxgraphic
object. If error is not specified or is
.nul then any error which occurs during object
creation will halt the program. If an error object is specified
and an error occurs during object creation then the error code is
output into that object and the addgraphic
method returns .nul.
|
Displays a menu object as a popup menu. The menu object may not already be used as part of an existing menubar. Optionally an x and a y parameter may be passed to establish where the menu should appear. If not specified, it appears at the mouse pointer position.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| menu | None | wxmenu | The menu object to be shown. |
| x | Current x position of the mouse pointer | integer | The desired x-coordinate where the menu should appear. |
| y | Current y position of the mouse pointer | integer | The desired y-coordinate where the menu should appear. |
Draws a rubber band style arc on the form. Which part of the arc is
flexible depends on which point is passed,
point1 or point2. Only
one of those two parameters may be passed! When the left mouse button
is released, the method returns. The position of the mouse will be
returned in the point parameter. The
midpoint is required. If the output result is
"buttonup" or "lostmouse" then
the point1 and point2,
parameters will contain the position of the rubber band line on
termination, otherwise their contents should not be used (currently
will be .nul). The result parameter could also
contain "notready" or "cancel".
The coordinates are relative to the origin of the form.
wxformvar.rubberbandarc (
point|fixedpoint ,
point|fixedpoint midpoint,
point|fixedpoint point1,
point point2,
string point )
results
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| midpoint | .nul | point|fixedpoint | The midpoint of the arc. This must be a preinitialized object! |
| point1 | .nul | point|fixedpoint | The first point of the line. This must be a preinitialized object! |
| point2 | .nul | point|fixedpoint | The second point of the line. This must be a preinitialized object! |
| point | .nul | point | The second point of the line. This must be a preinitialized object! |
| results | .nul | string |
The results of the function. This can be one of:
"buttonup", "lostmouse",
"notready" or "cancel". If
one of the first two values is returned, then the other
parameters will be filled with the coordinates of the selection,
otherwise they are invalid (and currently will be
".nul".
|
Draws a rubber band style box on the form. When the left mouse
button is released, the method returns. If the output result is
"buttonup" or "lostmouse" then
the left, top,
width, and height
parameters will contain the position of the rubber band box on
termination, otherwise their contents should not be used (currently
will be .nul). The result parameter could also
contain "notready" or "cancel".
The coordinates are relative to the origin of the form.
wxformvar.rubberbandbox (
integer ,
integer left,
integer top,
integer width,
string height )
results
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| left | .nul | integer | The left coordinate of the selection box. This must be a preinitialized object! |
| top | .nul | integer | The top coordinate of the selection box. This must be a preinitialized object! |
| width | .nul | integer | The width of the selection box. This must be a preinitialized object! |
| height | .nul | integer | The height of the selection box. This must be a preinitialized object! |
| results | .nul | string |
The results of the function. This can be one of:
"buttonup", "lostmouse",
"notready" or "cancel". If
one of the first two values is returned, then the other
parameters will be filled with the coordinates of the selection
box, otherwise they are invalid (and currently will be
".nul".
|
Draws a rubber band style ellipse on the form. When the left mouse
button is released, the method returns. If the output result is
"buttonup" or "lostmouse" then
the left, top,
width, and height
parameters will contain the position of the rubber band ellipse on
termination, otherwise their contents should not be used (currently
will be .nul). The result parameter could also
contain "notready" or "cancel".
The coordinates are relative to the origin of the form. To create an
ellipse from these coordinates, the midpoint of the width at the top,
the midpoint of the height at the right, and the exact midpoint of
the two must be passed to the method that creates the ellipse.
wxformvar.rubberbandellipsebox (
integer ,
integer left,
integer top,
integer width,
string height )
results
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| left | .nul | integer | The left coordinate of the selection box. This must be a preinitialized object! |
| top | .nul | integer | The top coordinate of the selection box. This must be a preinitialized object! |
| width | .nul | integer | The width of the selection box. This must be a preinitialized object! |
| height | .nul | integer | The height of the selection box. This must be a preinitialized object! |
| results | .nul | string |
The results of the function. This can be one of:
"buttonup", "lostmouse",
"notready" or "cancel". If
one of the first two values is returned, then the other
parameters will be filled with the coordinates of the selection
box, otherwise they are invalid (and currently will be
".nul".
|
Draws a rubber band style line on the form. When the left mouse
button is released, the method returns. If the output result is
"buttonup" or "lostmouse" then
the point1 and point2,
parameters will contain the position of the rubber band line on
termination, otherwise their contents should not be used (currently
will be .nul). The result parameter could also
contain "notready" or "cancel".
The coordinates are relative to the origin of the form.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| point1 | .nul | point | The first point of the line. This must be a preinitialized object! |
| point2 | .nul | point | The second point of the line. This must be a preinitialized object! |
| results | .nul | string |
The results of the function. This can be one of:
"buttonup", "lostmouse",
"notready" or "cancel". If
one of the first two values is returned, then the other
parameters will be filled with the coordinates of the selection,
otherwise they are invalid (and currently will be
".nul".
|
Draws one or more rubber band style lines on the form that converge
from the points supplied to the current position of the mouse. When
the left mouse button is released, the method returns. If the output
result is "buttonup" or
"lostmouse" then the point
parameter will contain the position of the mouse pointer on
termination, otherwise its contents should not be used (currently
will be .nul). The result parameter could also
contain "notready" or "cancel".
The coordinates are relative to the origin of the form.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| point | .nul | point | The position of the mouse at termination. This must be a preinitialized object! |
| results | .nul | string |
The results of the function. This can be one of:
"buttonup", "lostmouse",
"notready" or "cancel". If
one of the first two values is returned, then the other
parameters will be filled with the coordinates of the selection,
otherwise they are invalid (and currently will be
".nul".
|
.nul | point | The first point from which a line will be drawn to the position of the mouse pointer. This must be a preinitialized object! | |
.nul | point | The next point from which a line will be drawn to the position of the mouse pointer. This must be a preinitialized object! Any number of points can be added to be drawn from in the multiline function. They are not named parameters. |
Sets the background color of the form. The wxform
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.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| rgb | The current value of the backgroundrgb
property | integer | The new background color of the form. It is inadvisable to specify any value for this argument which is not the value of an existing rgb object. |
| red | The current value of the
backgroundrgb.red property | integer | The red component in the new background color of the form. This must be between 0 and 255 inclusive. |
| green | The current value of the
backgroundrgb.green property | integer | The green component in the new background color of the form. This must be between 0 and 255 inclusive. |
| blue | The current value of the
backgroundrgb.blue property | integer | The blue component in the new background color of the form. This must be between 0 and 255 inclusive. |
Sets the form to be the content of some suitable container. The wxform object itself is returned, to allow multiple setting methods to be put into one expression.
Sets the current mouse pointer for use when the mouse is over the form. The wxform object itself is returned, to allow multiple setting methods to be put into one expression.
| Parameter | Default value | Type name | Description |
|---|---|---|---|
| cursor | None | string |
The name of the cursor type to use when the mouse is over the
form. This can be any one of:
.nul to return the cursor to the
default behavior.
|
Sets the mask that is used to decide which mouse events that occur on the form. This does not apply to events that involve controls, only those that occur on the form itself. The wxform 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
|
The member operator followed by the form control name returns a reference to the form control. If the name provided is not correct (including case-sensitivity), then an error will occur.



