Hi all,
Does anyone know a way to detect when the bounds of a Window change? I can’t find any related action…
(My goal is to be able to regenerate windows as they last were – but I have found by the time the onClose
action is called, it’s too late to query .bounds
…)
Thanks in advance for any ideas
It’s in View rather than Window:
(
w = Window("test", Rect(800, 200, 500, 400)).front;
w.layout = VLayout(
nil,
StaticText().align_(\center).string_("hello"),
nil
);
w.view // a TopView btw
.onResize_({ |view|
view.findWindow.bounds.debug("resized")
})
.onMove_({ |view|
view.findWindow.bounds.debug("moved")
});
)
hjh