We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › size() resize()
Page Index Toggle Pages: 1
size() resize() ? (Read 1016 times)
size() resize() ?
Nov 29th, 2007, 2:03pm
 
Can we resize the windows at run time?

Cause my program is displaying some NxN grid of CxC cells in a NCxNC windows, and I would like the user to be able to interactively change those values (right now they are written into the program, so I have to re-edit and re-run the program to change them).

Could I use "createGraphics()" for that ?
Re: size() resize() ?
Reply #1 - Nov 30th, 2007, 2:18pm
 
a quick search in the forum and you have the solution:

(snippet from seltar, posted in this thread: http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Integrate;action=display;num=1147684168 )

void resize(int w, int h) {
 size(w,h);
 frame.setSize(w,h);
}
Page Index Toggle Pages: 1