Code: Select all
import "ecere"
class Form1 : Window
{
text = "1+1=2";
background = activeBorder;
borderStyle = sizable;
hasClose = true;
size = { 400, 216 };
anchor = { horz = -91, vert = -108 };
Button button1
{
this, text = "add", size = { 64, 21 }, position = { 224, 64 };
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
editBox3.contents = PrintString(atoi(editBox1.contents) + atoi(editBox2.contents));
return true;
}
};
Label label1 { this, text = "number1", position = { 40, 64 } };
Label label2 { this, text = "number2", position = { 40, 104 } };
Label label3 { this, text = "result", position = { 48, 136 } };
EditBox editBox1 { this, text = "editBox1", position = { 104, 64 } };
EditBox editBox2 { this, text = "editBox2", position = { 104, 104 } };
EditBox editBox3 { this, text = "editBox3", position = { 104, 136 } };
bool OnCreate(void)
{
editBox3.contents="0";
editBox2.contents="0";
editBox1.contents="0";
return true;
}
}
Form1 form1 {};