RosettaCodeData/Task/Hello-world-Graphical/Elena/hello-world-graphical.elena

28 lines
655 B
Text
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
import forms;
2015-11-18 06:14:39 +00:00
2019-09-12 10:33:56 -07:00
public class MainWindow : SDIDialog
2015-11-18 06:14:39 +00:00
{
2019-09-12 10:33:56 -07:00
Label goodByeWorldLabel;
Button closeButton;
2015-11-18 06:14:39 +00:00
2019-09-12 10:33:56 -07:00
constructor new()
<= new()
{
goodByeWorldLabel := new Label();
closeButton := new Button();
2015-11-18 06:14:39 +00:00
2019-09-12 10:33:56 -07:00
self
.appendControl(goodByeWorldLabel)
.appendControl(closeButton);
2015-11-18 06:14:39 +00:00
2019-09-12 10:33:56 -07:00
self.setRegion(250, 200, 200, 110);
2015-11-18 06:14:39 +00:00
2019-09-12 10:33:56 -07:00
goodByeWorldLabel.Caption := "Goodbye, World!";
goodByeWorldLabel.setRegion(40, 10, 150, 30);
2015-11-18 06:14:39 +00:00
2019-09-12 10:33:56 -07:00
closeButton.Caption := "Close";
closeButton.setRegion(20, 40, 150, 30);
closeButton.onClick := (args){ forward program.stop() };
}
2015-11-18 06:14:39 +00:00
}