CreateCheckbox Method

This member of WaveLinkFactory Object 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.

VB

object.CreateCheckbox XCoord, YCoord, Width, Height, LabelText, InitialState, MyColl

VC++

HRESULT hr = object->CreateCheckbox(short XCoord, short YCoord, short Width, short Height, BSTR LabelText, CheckboxState InitialState, WaveLinkWidgetCollection MyColl);

Parameters

XCoord

The starting left coordinate of the widget

YCoord

The starting top coordinate of the widget

Width

The horizontal extent of the widget. Pass a value of 0 to set the width automatically.

Height

The vertical extent of the widget. Pass a value of 0 to set the height automatically.

LabelText

The display text of the widget

InitialState

The initial state of the checkbox (CHECKED, UNCHECKED, UNDETERMINED). The possible values for the checkbox state are:

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

MyColl

The name of the collection that will contain the widget

Remarks

The default value returned by a checkbox widget through an RFInput or GetEvent call will be the checkbox state.

The DefaultCoordinateType property determines how the application interprets the values entered for the position, width, and height of the widget.

You can set the size of the widget to AUTOSIZE by setting the width and height to zero (0). It is recommended that you use the AUTOSIZE setting for the height and width of the checkbox. Using a value other than AUTOSIZE will not affect the size of the widget, only the extent of the clickable area surrounding it.

Example

' VB Sample Code
Dim wlio As New RFIO
Dim wlfactory As New WaveLinkFactory
Dim wlcheckboxcoll As New WaveLinkWidgetCollection
Dim PassCarCheckBox As WaveLinkWidget
.
.
.
' In this example, give the widget a context
wlio.RFPrint 0, 0, "WaveLink Corporation", WLCLEAR + WLREVERSE
wlio.RFPrint 0, 1, " Auto Detailing ", WLNORMAL
wlio.RFPrint 0, 3, " Select Vehicle ", _
WLNORMAL + WLFLUSHOUTPUT
' Create the widget
Set PassCarCheckBox = wlfactory.CreateCheckbox(0, 5, 0, 0, _
"Passenger Auto", UNCHECKED, _
wlcheckboxcoll)

wlcheckboxcoll.StoreWidgets

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal