Skip to content

Window.Deactivated

event · Window · cAlgo.API

DesktopCLICloud

This event gets triggered when window is deactivated

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<WindowDeactivatedEventArgs> Deactivated;
window.Deactivated += handler  # handler(obj: WindowDeactivatedEventArgs)

Examples

var window = new Window { Title = "Order entry", Width = 300, Height = 200 };
window.Deactivated += args => Print("Window '{0}' deactivated", args.Window.Title);
window.Show();
def on_start(self):
    window = Window()
    window.Title = "Order entry"
    window.Deactivated += self.on_window_deactivated
    window.Show()

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