|
Thanks Ian MacArthur. Gonzalo Garramuño helped me get to a solution, similar to your suggestions. I have a suggestion for FLTK maintainers like Ian MacArthur I guess. Why don't we have something like this implemented (like Constraint Layout in Android):
CoordinateManager().set(addrSubject)
.leftTo (DIRECTION d, void* addrBenefactor, bool stretch = false) .rightTo (DIRECTION d, void* addrBenefactor, bool stretch = false) .topTo (DIRECTION d, void* addrBenefactor, bool stretch = false)
.bottomTo (DIRECTION d, void* addrBenefactor, bool stretch = false) .centerTo (void* addrBenefactor) .centerTo (int x, int y, int x2 = 0, int y2 = 0) .leftTo (int x, bool stretch = false)
.rightTo (int x, bool stretch = false)
.topTo (int y, bool stretch = false) .bottomTo (int y, bool stretch = false) .set(addrBenefactor) .leftBy (int n, bool stretch = false)
.rightBy (int n, bool stretch = false) .topBy (int n, bool stretch = false) .bottomBy (int n, bool stretch = false) .render();
Just x, y, w, h manipulations.
On Thursday, November 17, 2022 at 2:59:39 PM UTC+2 Ian MacArthur wrote:
On Thursday, 17 November 2022 at 12:41:02 UTC oletter... wrote:
How to prevent stretching/shrinking of dynamically added widgets on window resize?
Might be useful to us to have more context for what you are actually doing; do you have some small, compile-able code samples, for example, that would illustrate what you are doing, and perhaps some descriptions of what effect you want to attain...
In general, if no widget in a container (i.e. a group or window, usually) is identified as the resizable, then any resizing it shared out amongst all the widgets.
The "usual solutions" are to either make the window non-resizable, or to assign a widget to "consume" the resizing (sometimes a hidden widget in the group is used to achieve this.)
--
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 on the web visit https://groups.google.com/d/msgid/fltkgeneral/0706dc6a-2e1a-4399-acaf-34d961362c63n%40googlegroups.com.
[ Direct Link to Message ] | |