Skip to content

Window.Closed

event · Window · cAlgo.API

DesktopCLICloud

This event gets triggered when window is closed

Environment behaviour

CLI — not supported. Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.

Cloud — not supported. Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.

Definition

public event Action<WindowClosedEventArgs> Closed;
window.Closed += handler  # handler(obj: WindowClosedEventArgs)

Examples

var window = new Window { Title = "Settings", Width = 300, Height = 200 };
window.Closed += args => Print("Window '{0}' closed", args.Window.Title);
window.Show();
def on_start(self):
    window = Window()
    window.Title = "Settings"
    window.Closed += self.on_window_closed
    window.Show()

def on_window_closed(self, args):
    api.Print(f"Window '{args.Window.Title}' closed")