int old_h - win->h();
I mean on resize main window.
subwindow->resizable(mainwindow);
resizes width and height.
I want that width resize but keep height fixed.
Thanks
Daniel,
Hi,How to resize a subwindow only the width, keeping is height fixed?win->resizable(??)Thanks
-- ggar...@gmail.com
How to resize a subwindow only the width, keeping is height fixed?win->resizable(??)
I could be wrong, but I think the OP means how to resize a subwindow manually keeping its height, not programmatically.
If so, he should read the FLTK manual section on "How Does Resizing Work":
https://www.fltk.org/doc-1.5/resize.html
As an aside, there's a typo in the Fl_Window docs., when I went to look this up to check, I saw:
<quote from docs>
You can also call the Fl_Widget methods size(x,y) and position(w,h), which are inline wrappers for this virtual function.
<endquote>
Which threw me as the params to size() and position() are swapped about, i.e. it _should_ be...
If there are other widgets below and above the subwindow, then it becomes more complicated, and (as others wrote) using Fl_Flex and/or Fl_Grid would likely be a better choice. It's really worth studying these container widgets, and there are six (6!) example programs in test/grid*.cxx and test/flex*.cxx, resp..
-- ggar...@gmail.com