eventEditText

eventEditText( )

Description
Event handler of editText widjet


Syntax
Boolean  eventEditText(id) 

Parameters
  id : id of editText widget
  return value : 1 (if editText widget has value)


Usages
eventEditText(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: