Yes, i prefer version 1.3.x. I am in accord with you (groups is the best option), but the reason of why to use sub-windows inside a group, if because my app uses: An movable child-window (with buttons inside), that floats over a scrollable background in the main window. When using pure groups(with no subwindows), when the movable window is over scrollable area, and the scrolls are moved up or down, part of movable window is scrolled too, and distorts the widgets. Using one sub-Window inside one sub-Group corrects this behavior, and the widgets don't distort and looks ok. Anyway, my question is: Why, If i build the widget group (containing the sub-window) at compile time, it works okay. But if i build the same widget at run-time (callbacks), the sub-window only is shown if the main window is hidden and re-shown using the window manager. My sent program demonstrates this, but how to fix this..? Thank you for your valuable answer.
On Sat, Aug 25, 2012 at 4:47 PM, Matthias Melcher <[email protected]> wrote: > > On 25.08.2012, at 21:40, Marc Cunning <[email protected]> wrote: > > > Hi, > > I need to create dynamically (at run-time with callbacks) widget groups, > > but when adding buttons and sub-windows in the same group, > > the buttons are shown ok, but the window not. What's wrong here..? > > Below, Using the program example provided by greg, with an little > variant, > > to sample this question. > > Any idea..? > > In FLTK, you normally create your widgets from the outside in. You start > with the main window, then add groups, and then add widgets to those > groups, using end() to go back up in that hierarchy. Using a window inside > a window is the exception and only needed if you require a native window > ID, for example for OpenGL context or for media players. Instead, you > should use a group. > > You can us a window, but if you add it to the group later, you need to > call show() on it. > > - Matthias > > PS: assuming this is 1.3. > _______________________________________________ > fltk mailing list > [email protected] > http://lists.easysw.com/mailman/listinfo/fltk > _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

