hello guys.
I am trying to save the value of textbox in a variable, I created textbox with the help of "G4P GUI BUILDER", so how can I store the typed value in variable.
/** =========================================================
* ==== WARNING ===
* =========================================================
* The code in this tab has been generated from the GUI form
* designer and care should be taken when editing this file.
* Only add/edit code inside the event handlers i.e. only
* use lines between the matching comment tags. e.g.
void myBtnEvents(GButton button) { //_CODE_:button1:12356:
// It is safe to enter your event code here
} //_CODE_:button1:12356:
* Do not rename this tab!
* =========================================================
*/
public void textfield1_change1(GTextField source, GEvent event) { //_CODE_:txtName:280460:
println("txtName - GTextField >> GEvent." + event + " @ " + millis());
} //_CODE_:txtName:280460:
// Create all the GUI controls.
// autogenerated do not edit
public void createGUI(){
G4P.messagesEnabled(false);
G4P.setGlobalColorScheme(GCScheme.BLUE_SCHEME);
G4P.setCursor(ARROW);
surface.setTitle("Sketch Window");
txtName = new GTextField(this, 148, 145, 160, 30, G4P.SCROLLBARS_NONE);
txtName.setOpaque(true);
txtName.addEventHandler(this, "textfield1_change1");
}
// Variable declarations
// autogenerated do not edit
GTextField txtName;
thanks