Skip to content

Instantly share code, notes, and snippets.

@jerstlouis
Created June 4, 2016 06:57
Show Gist options
  • Save jerstlouis/2d7057ef95e075175d27661598c76c19 to your computer and use it in GitHub Desktop.
Save jerstlouis/2d7057ef95e075175d27661598c76c19 to your computer and use it in GitHub Desktop.
import "ecere"
class Form1 : Window
{
caption = $"Form1";
background = formColor;
borderStyle = sizable;
hasMaximize = true;
hasMinimize = true;
hasClose = true;
clientSize = { 632, 438 };
Button button1
{
this, caption = $"Make Middle Button's text Green", position = { 56, 160 };
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
button2.foreground = green;
return true;
}
};
Button button2
{
this, caption = $"Make Form Blue", position = { 272, 376 };
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
form1.background = blue; // Using global
return true;
}
};
Button button3
{
otherParent, master = this, $"Make this button's parent red", position = { 104, 48 };
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
button3.parent.background = red;
return true;
}
};
Button button4
{
otherParent, master = this, $"Make this button's master yellow", position = { 32, 216 };
bool NotifyClicked(Button button, int x, int y, Modifiers mods)
{
background = yellow;
return true;
}
};
Window otherParent { this, borderStyle = deep, size = { 300, 300 }, position = { 296, 16 } };
}
Form1 form1 {};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment