difference between wxMenu and wxMenuItem ?
John Ratliff
webmaster at technoplaza.net
Mon Jul 2 12:31:05 PDT 2007
Xu, Ming (NIH/NLM/NCBI) [F] wrote:
> wxMenuItem
>
> Hi,
> what's the difference between wxMenu and wxMenuItem ?
> I would like to dynamically add or remove wxMenu w/ submenus,
> But wxMenu::Remove owkrs on wxMenuItem ?
> wxMenu::Remove
> wxMenuItem * Remove(int id)
> wxMenuItem * Remove(wxMenuItem *item)
>
As the names imply, the wxMenu is for a menu, while wxMenuItem is
something on a menu.
You can put menus on menus to create submenus, but they must eventually
contain menu items to be useful.
The first Remove removes whatever is on that menu in the id indexed
position. i.e. Remove(0) removes the first thing on the menu. If that
were a submenu, that menu would now be gone.
--John Ratliff
More information about the wx-users
mailing list