/* * Resizing Windows * ---------------- * This program makes use of the resize function to change the * size of a window. * * The resize function can be used with controls as well as * windows, so that buttons, text fields and textboxes can * be moved or resized when the window is resized. */ #include window w; void bigger(button b) { resize(w, rect(100,100,400,300)); } void smaller(button b) { resize(w, rect(100,100,200,150)); } void main(void) { w = newwindow("Resize this Window", rect(100,100,300,250), Titlebar + Closebox + Minimize); newbutton("Bigger", rect(10,10,80,30), bigger); newbutton("Smaller", rect(10,50,80,30), smaller); show(w); mainloop(); }