FLTK logo

[fltk.general] Re: fltk resizable fixed height

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
[  All Forums  |  Back to fltk.general  ]
 
[ Previous Message ] [ New Message | Reply ] [ Next Message ]

Re: fltk resizable fixed height Ian MacArthur Aug 22, 2025  
 
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?
win->resizable(??)
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 ]
 
     
[ Previous Message ] [ New Message | Reply ] [ Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.