

Task

Display the string       Goodbye, World!       on a GUI object   (alert box, plain window, text area, etc.).



Related task

   Hello world/Text


import forms;
 
public class MainWindow : SDIDialog
{
    Label goodByeWorldLabel;
    Button closeButton;
 
    constructor new()
       <= new()
    {
        self.Caption := "ELENA";
 
        goodByeWorldLabel := Label.new();
        closeButton       := Button.new();
 
        self
            .appendControl(goodByeWorldLabel)
            .appendControl(closeButton);        
 
        self.setRegion(250, 200, 200, 110);
 
        goodByeWorldLabel.Caption := "Goodbye, World!";
        goodByeWorldLabel.setRegion(40, 10, 150, 30);
 
        closeButton.Caption := "Close";
        closeButton.setRegion(20, 40, 150, 30);
        closeButton.onClick := (args){ forward program.stop() };
    }
}