This member of Class WaveLinkFactory is supported on: Palm, CE
The CreateBitmap Method creates a image based on a bitmap file.
Syntax
public WaveLinkWidget CreateBitmap(int XCoord, int YCoord, int Width, int Height, String bitmapFile,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 |
bitmapFile |
The file name of the bitmap image (must include the full path) |
targetCollection |
The name of the collection that will contain the widget |
Returns
A pointer to the bitmap 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, 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).
The CreateBitmap Method automatically stores the path for the bitmap image in the SpecialString Property.
Example
WaveLinkFactory factoryIface = new WaveLinkFactory();
WaveLinkWidgetCollection colIface = new
WaveLinkWidgetCollection();
WaveLinkIO ioIface = new WaveLinkIO();
WaveLinkFile fileIface = new WaveLinkFile();
try {
// The following code illustrates an easy way to
// transfer the image file.
fileIface.RFTransferFile("C:\temp\logo.bmp", "logo.bmp", true);
// You may choose to clear the screen before creating the bitmap.
ioIface.RFPrint(0, 35, "", WaveLinkIO.WLCLEAR);
factoryIface.setDefaultCoordinateType (WaveLinkWidget.BYPIXEL);
factoryIface.CreateBitmap(20, 20, 35, 25, "logo.bmp", colIface);
colIface.StoreWidgets();
}
catch (WaveLinkError wlErr) {
//Do error handling
}
Was this article useful?
The topic was:
Inaccurate
Incomplete
Not what I expected
Other