Description
Message of returned value of editText widjet
Syntax
String messageEditText(id)
Parameters
id : id of editText widget
return value : string of user input value of editText widjet
Usages
messageEditText(1)
Examples in arduino
#include "AppGosu.h"
AppGosu app;
void setup() {
app.start();
app.setDelayCmd(20); // max speed 20ms
app.clearAll();
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)) {
String sss = app.messageEditText(1);
app.fill(50,50,70);
app.rect(130, 100, 350, 70);
app.fill(250,250,250);
app.text(sss, 150, 100 + 50);
}
}
//---------------------------------------------------------
void myStart(void) {
// user starting code here
app.clearAll();
app.fill(50,50,70);
// editText
app.editText(10, 100, 120, 80, 1);
app.rect(130, 100, 350, 70);
// title
app.fill(250,250,250);
app.textSize(50);
app.text("--- editText ----", 50, 80);
}
from AppGosu
-----------------------------------------
No comments:
Post a Comment