Window.SizeChanged
event · Window · cAlgo.API
DesktopCLICloud
This event gets triggered when window is size changes
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<WindowSizeChangedEventArgs> SizeChanged;
window.SizeChanged += handler # handler(obj: WindowSizeChangedEventArgs)
Examples
var window = new Window { Title = "Resizable", Width = 300, Height = 200 };
window.SizeChanged += args => Print("Window size: {0}x{1}", args.Window.Width, args.Window.Height);
window.Show();
def on_start(self):
window = Window()
window.Title = "Resizable"
window.SizeChanged += self.on_size_changed
window.Show()
def on_size_changed(self, args):
api.Print(f"Window size: {args.Window.Width}x{args.Window.Height}")