I understand how to add normal menus and menu items by using append.
However, when creating menus inside a designer and it’s output to
source, I can’t figure out how to reference the menu from xrc to append
items to. Example:
I have a Menu called Favorites. Currently it has one item on it called
Add Query to Favorites along with a separator (divider).
I want to read from file and add favorite items beneath this separator,
so normally if the code was written by me, I could do something like:
favorites = Wx::Menu.new()
favorites.append(101, “&Some Name”, “Some Statusbar description”)
However, in the ruby file that’s pulled from XRC, the only variables
@mb_main = finder.call(“mb_main”)
… which points to the entire menubar
@mb_fm_addfavorite = finder.call(“mb_fm_addfavorite”)
… which points to the add favorite menu item beneath the favorite menu.
Notice that there’s no favorite menu variable stored in the ruby file
from xrc source and there’s no place in the GUI designer (using
dialogblocks) to place a custom ID for this menu.
So, how do I reference the menu and append items to it?
Thanks in advance.