[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] limit window constraints?



Hi all,

I'm trying to create a window that can be resized in height, but always keeps a fixed width. My approach is the following:

(
w = Window( "test", Rect(100,500,200,200) ).front;
w.drawHook = { |win| if( win.bounds.width != 200 ) { win.bounds = win.bounds.width_(200) }; };
// now resize the window by hand
)

Although this does the job, it looks very ugly: the window is flashing all the time when the window is resized. Are there other ways to do this? Or could it be added to the primitive functionality of SCWindow?

Other features like a settable minimum size, a fixed height and maybe a separate alpha setting for the window only (leaving it's contents untouched) would also be very welcome..

cheers,
Wouter

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/