CreateButton Method

This member of WaveLinkFactory Object is supported on: Palm, CE

The CreateButton method creates a standard labeled button that triggers a specific action when the user "clicks" it.

VB

object.CreateButton XCoord, YCoord, Width, Height, LabelText, MyColl

VC++

HRESULT hr = object->CreateButton(short XCoord, short YCoord, short Width, short Height, BSTR LabelText, 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

MyColl

The name of the collection that will contain the widget

Remarks

The default value returned by a button widget through an RFInput or GetEvent call will be the display text.

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). This setting sizes the button widget according to the size of the text that it contains.

Example

' VB Sample Code
Dim wlfactory As New WaveLinkFactory
Dim wlwidgcoll As New WaveLinkWidgetCollection
Dim wlio As New RFIO
Dim wlterm As New RFTerminal
Dim myWidget As WaveLinkWidget
.
.
.
' In this example, give the widget some context
wlio.RFPrint 0, 0, "WaveLink Corporation", WLCLEAR + WLREVERSE
wlio.RFPrint 0, 1, " Auto Detailing ", WLNORMAL
' create the widget
Set myWidget = wlfactory.CreateButton(4, _
(wlterm.TerminalHeight - 2), _
0, 0, " OK ", wlwidgcoll)

wlwidgcoll.StoreWidgets

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal