CreateHotspot Method

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

The CreateHotspot Method creates an invisible area that triggers a specific action when the user taps it.

Syntax

public WaveLinkWidget CreateHotspot(int XCoord, int YCoord, int Width, int Height, 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 (This value must be greater than zero)

Height

The vertical extent of the widget (This value must be greater than zero)

targetCollection

The name of the collection that will contain the widget

Returns

A pointer to the hotspot widget

Throws

WaveLinkError

Remarks

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, the value must be greater than zero (0).

Example

WaveLinkFactory factoryIface = new WaveLinkFactory();

WaveLinkWidgetCollection colIface = newWaveLinkWidgetCollection();

WaveLinkIO ioIface = new WaveLinkIO();

try {

// In this example, clear the screen and hide the cursor.

ioIface.RFPrint(0, 35, "", WaveLinkIO.WLCLEAR);

factoryIface.setDefaultCoordinateType (WaveLinkWidget.BYPIXEL);

// Give some context for the hotspot.

factoryIface.CreateBitmap(20, 20, 35, 25, "logo.bmp", colIface);

// Create the widget.

factoryIface.CreateHotspot(20, 20, 35, 25, "your name", colIface);

colIface.StoreWidgets();

}

catch (WaveLinkError wlErr) {

//Do error handling

}

 


Was this article useful?    

The topic was:

Inaccurate

Incomplete

Not what I expected

Other

Privacy and Legal