On 3 Mar 2007, at 17:20, Edward Arthur wrote:
> Ian and Mike, I'm not using Fluid, I'm setting up the menu like this:
>
> m = new Fl_Menu_Bar(0, 0, opts.width(), 30);
>
> and populating it from one of 3 static structures.
>
> So, I'd have to make a group and have say mLeft and mRight?

Sure - just pass my code to "fluid -c" and then check (copy!) the C++  
that produces.

But yes, you need to create a "dummy" group (mGroup, say) suitably  
sized to hold "the menubar", then fill that group with two actual  
menu bars, mLeft, mRight, say.
Make mRight just big enough to hold your help menu, with mLeft  
totally filling the rest of the space.
Set mLeft as the resizable for the mGroup,   mGroup->resizable(mLeft);
And hope for the best.

The only downside to this approach is that (depending on box styles  
used) you may get a "divider line" between mLeft and mRight.
Actually, I quite like that effect, but you may not.
By juggling about with box styles of the menubars and the parent  
group, you can change the appearance of that line, but be aware that  
the menu items inherit their styles from their parent menubar, and  
not all possible menubar box styles make nice looking menu items...

As a quick check, you can compile up my example very swiftly by just  
doing:
fluid -c example.fl
fltk-config --compile example.cxx

HTH,
-- 
Ian

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to