> > > Below is my .fl file with the original menu bar reproducing the error. > > Hope it helps! > > Thanks > > > Hmm, OK - I *think* the problem is the empty "Recent Files" submenu item... > > If that item is made to be not-empty, then things seem to work a whole lot = > better! > > Though, for what it is worth, I don't think that using the fluid-generated = > "offsets" is going to work all that well if you are using any dynamically g= > enerated menu content, since the computed offsets will likely always be wro= > ng. (Though, indeed I could be wrong too!) > > I'd favour doing what Greg does, and build and manipulate the menus dynamic= > ally... Um, try starting about here: > > http://www.seriss.com/people/erco/fltk/#Menu_ChangeLabel = > > > > > The alternate might be, if you plan on having a fixed number of previous fi= > les listed, to pre-populate the "Recent Files" submenu with "unused" entrie= > s, then either hiding or inactivating those until they are populated. > > That should work... I think... Maybe... Yup, just tested that and it seems = > to be fine (used "inactive" entries in my test, though I assume hidden woul= > d do too!) > > > ******************************************************************** > This email and any attachments are confidential to the intended > recipient and may also be privileged. If you are not the intended > recipient please delete it from your system and notify the sender. > You should not copy it or use it for any purpose nor disclose or > distribute its contents to any other person. > ******************************************************************** >
Thanks for the answer. It's ok that it will not work when the menu is modified at run time; but I think the menu_item access should work correctly as long as the menu is *not* modified. (This is given in my case.) Alternatively FLUID could generate the menu_item pointer in the .h file as a function call (using Gregs recommendation) like : #define PTimeBaseTEST (menu_PMenuBar->find_item("Settings/TimeBase/Test Time")) That should work even on modified menus. [OK, but only as long as the the menu_item name is not modified... :-( ] Regards Rainer _______________________________________________ fltk mailing list fltk@easysw.com http://lists.easysw.com/mailman/listinfo/fltk