Description
clear editText widjet
Syntax
clearEditText(id)
Parameters
id : id of editText widjet
Usages
clearEditText(1)
Examples in arduino
#include "AppGosu.h"
AppGosu app;
void setup() {
app.start();
app.setDelayCmd(20); // max speed 20ms
myStart();
}
void loop() {
} // end of loop
//---------------------------------------------------------
void serialEvent() {
app.serialMessage();
EventLoop();
}
void EventLoop() {
if( app.btConnected()) { // for auto starting
myStart();
}
// user event code here
if( app.eventEditText(1)) { // event handler
app.clearEditText(1);
app.background(0,0,0);
app.text("editText 1 cleared", 100,400);
}
}
//---------------------------------------------------------
void myStart(void) {
// user starting code here
app.clearAll();
app.background(0,0,0);
app.textSize(50);
app.fill(255,255,255);
app.text("-- clear editText --", 50, 50);
// make editText
app.editText(10,100,150, 80, 1);
}
by AppGosu
-----------------------------------------
No comments:
Post a Comment