On 8/12/2021 1:39 PM,
kamist...@gmail.com wrote:
> I think instead of fidgeting around with OS dependent stuff to align
> frames side by side,
> I would take another approach (inspired by other applications):
>
> 1. per default the application is just a big window with multiple
> sections divided with panels, splits, tabs, etc.
> 2. some of those areas might be useful as sepparate frames for some
> users, add a button "undock"
> 3. clicking that button creates a frame and reparents the panel into
> the newly created frame
> 4. button changes to "dock"
> 5. clicking it reparents the panel back to where it was originally and
> deletes the frame
>
> There might be some coding needed to save and restore state about what
> has been undocked and the last positions of the windows,
> so that can be restored when the application is restarted.
> (although some OS's may restore window positions themselves if they
> have unique titles??)
>
> What I like about that approach is that it gives the user choice and
> can be ignored if its not needed.
If I understand correctly, Don seems to want menus in his side-by-side
"panels".
Currently a menubar must be a child of a frame - so, to have menus,
Don's "panels" must be frames. But that is ok, because a frame can be a
child of another frame.
Allowing (un)docking is a good idea (if applicable), but switching
between panels and frames is unnecessarily complicated ... a frame can
be drawn floating or docked, resizeable or not, with or without borders,
system menu, captions, toolbar, menubar, etc. - so visually it can be
made to /appear/ as if a panel when docked, and as if a window when
undocked. It's a lot easier to just redraw the frame(s) with different
settings than to try to maintain multiple different object hierarchies
or to try to reassign parentage on the fly (which is mistake prone if
many functions are handled by the parent).
YMMV,
George