Download TouchPAD - ICP DAS

Transcript
4.
In order to make it clearer, we copy the codes below with their
corresponding results.
Results
Codes of the event handler
//step 0
//the beginning snapshot
N/A
//step 1
//Click on BitButton “change Text”
void BitButton17OnClick(tWidget *pWidget)
{
static char *str = "Hello! TouchPAD";
CanvasTextSet(&LabelWidget18, str);
WidgetPaint((tWidget*) &LabelWidget18);
// or use LabelTextSet to replace
// CanvasTextSet and WidgetPaint, that is:
// LabelTextSet(&LabelWidget18, str);
}
//step 2
//Click on BitButton “change Font”
void BitButton19OnClick(tWidget *pWidget)
{
//change Font to size 20
CanvasFontSet(&LabelWidget18,
&g_sFontCm20);
WidgetPaint((tWidget*) &LabelWidget18);
}
TouchPAD User Manual, version 1.0.12. Last Revised: May 2012
Copyright © 2012 ICP DAS Co., Ltd. All Rights Reserved.
Page: 177
 E-mail: [email protected]