Skip to content

Instantly share code, notes, and snippets.

@ecere
Created January 12, 2013 08:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ecere/4516824 to your computer and use it in GitHub Desktop.
Save ecere/4516824 to your computer and use it in GitHub Desktop.
import "ecere"
class MyView : Window
{
Button b1
{
this, anchor = { top = 200 }, size = { 100, 100 }, caption = "OK", isDefault = true;
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
// eC needs a string class :)
String s = PrintString($"Welcome ", tf1.contents, "!");
label.caption = s;
delete s;
return true;
}
};
Label label { this, foreground = black, anchor = { top = 10 }, labeledWindow = tf1 };
EditBox tf1 { this, foreground = 0x336699, caption = $"Enter your name", position = { 10, 50 }, size = { 250, 50 } /* Ecere needs rounded controls :) */ };
caption = "FirstView";
background = formColor;
borderStyle = sizable;
hasClose = true;
clientSize = { 300, 400 };
font = { "Arial", 20 };
}
MyView firstView {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment