On Friday, 22 August 2025 at 10:59:38 UTC+1 daniel wrote:
Hi, How to resize a subwindow only the width, keeping is height fixed? Thanks
Programmatically, you mean?
Can you not just do something like:
int old_h - win->h();
win->size (new_w, old_h);
I think that'd work...
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...
You can also call the Fl_Widget methods size(w,h) and position(x,y), which are inline wrappers for this virtual function.
FWIW, I think that's been back-to-front for a very long time, too. We never noticed!
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com .
To view this discussion visit https://groups.google.com/d/msgid/fltkgeneral/07607c6b-deaa-4966-96c6-fd7f0fca3943n%40googlegroups.com .
[ Direct Link to Message ]