This member of Class WaveLinkFactory is supported on: Palm, CE
The CreateCheckbox Method creates a widget that stores an on/off state. The on/off state switches when the user taps it.
Syntax
public WaveLinkWidget CreateCheckbox(int XCoord, int YCoord, int Width, int Height, String displayText, int initialState, WaveLinkWidgetCollection targetCollection)
throws WaveLinkError
Parameters
XCoord |
The starting left coordinate of the widget |
YCoord |
The starting top coordinate of the widget |
Width |
The horizontal extent of the widget |
Height |
The vertical extent of the widget |
displayText |
The display text of the widget |
initialState |
The initial state of the checkbox |
targetCollection |
The name of the collection that will contain the widget |
Returns
A pointer to the checkbox widget
Throws
WaveLinkError
Remarks
0 - UNCHECKED |
This constant represents an unchecked checkbox state |
1 - CHECKED |
This constant represents a checked checkbox state |
2 - UNDETERMINED |
This constant represents an undetermined checkbox state |
The DefaultCoordinateType Property determines how the application interprets the values entered for the position, width, and height of the widget.
For the Width and Height parameters, pass a value of 0 to set the width or height automatically. Set the size of the widget to AUTOSIZE by setting both the width and height to zero (0).
We recommend that you use AUTOSIZE setting for the height and width of the checkbox. Using a value other than AUTOSIZE does change the size of the widget, only the extent of the clickable area surrounding it.
Example
WaveLinkFactory factoryIface = new WaveLinkFactory();
WaveLinkWidgetCollection colIface = new WaveLinkWidgetCollection();
WaveLinkIO ioIface = new WaveLinkIO();
try {
// Give the widget some context
ioIface.RFPrint(0, 0, "WaveLink Corporation", WaveLinkIO.WLCLEAR | WaveLinkIO.WLREVERSE);
ioIface.RFPrint(0, 1, " Auto Detailing ", WaveLinkIO.WLNORMAL);
ioIface.RFPrint(0, 3, " Select Vehicle ", WaveLinkIO.WLNORMAL | WaveLinkIO.WLFLUSHOUTPUT);
factoryIface.CreateCheckbox(0, 5, 0, 0, "Passenger Auto", WaveLinkWidget.UNCHECKED colIface);
colIface.StoreWidgets();
}
catch (WaveLinkError wlErr) {
//Do error handling
}
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other