![background image](http://html1.mh-extra.com/html/icp-das-usa/touchpad-tpd-series/touchpad-tpd-series_programming-manual_3682250034.webp)
TPD/VPD Series - Getting Started v.1.0.5
Page 30
Copyright@ 2012 ICP DAS CO., LTD. All Rights Reserved. E-mail: [email protected]
c.
When finished, click “Save & Close” from the File menu.
Step 7: Configure the properties for the “Label” component.
a.
Select a Label ("LabelWidget5" or "LabelWidget7").
a.
b.
long cnt1=0;
static char str1[32];
void BitButton4OnClick(tWidget *pWidget)
{
hmi_Beep();
cnt1=cnt1+1;
if (cnt1>100)
{
cnt1=0;
}
usprintf(str1,"%d",cnt1);
LabelTextSet(&
LabelWidget5
, str1);
}
Beep function
Declare the variables
b.
c.
Convert the integer to a
string in order to display
it on the Label.
This name must be the same as the “Name” and
“ID” properties of the Label.