controlP5 resize control window
in
Contributed Library Questions
•
1 year ago
Hi,
Part of integrating controlP5 in the new version of the ANAR+ library, I would like to be able to fit the control window to the number of sliders created by the users.
Since i cannot infer in advance the number of sliders in the code (it may even be dynamic), I would like to be able to fit the window to the current number of sliders. Or to let the user resize itself or to be able to scroll down if the number is too large.
I have tried
Similarly
It seems like I am not far away but cannot see the path...
another small question: How can I set the focus on the original window ??
Thanks in advance.
Part of integrating controlP5 in the new version of the ANAR+ library, I would like to be able to fit the control window to the number of sliders created by the users.
Since i cannot infer in advance the number of sliders in the code (it may even be dynamic), I would like to be able to fit the window to the current number of sliders. Or to let the user resize itself or to be able to scroll down if the number is too large.
I have tried
- controlWindow.papplet().frame.setResizable(true);
Similarly
- Dimension dim = controlWindow.papplet().frame.getSize();
dim.setSize(dim.getWidth()+10, dim.getHeight()+200);
controlWindow.papplet().frame.setSize(dim);
It seems like I am not far away but cannot see the path...
another small question: How can I set the focus on the original window ??
Thanks in advance.
1