On Aug 4, 2009, at 9:43 PM, Manoharan Durga wrote:
> Now, I would like to add a new Menu Item to the Menu Bar. Not another
> Menu, but just a single menu item - something like Quit. The users can
> just click on that and close the application. I think, it should be
> something like
>
> miquit = dabo.ui.dMenuItem()
>
> But, how to append this menu item to the menubar?
You don't create the menu items independently; the best approach is
to use the menu's append method:
def append(self, caption, help="", bmp=None, picture=None,
menutype="", *args, **kwargs):
A caption is required; 'help' will show up as the help text when the
menu is highlighted; 'bmp' is old, use 'picture' instead to set any
image you want for the menu item; 'menutype' is omitted unless you
need a radio or check menu item; args are not really used; kwargs are
used mostly for stuff like passing the OnHit handler. Take a look at
ClassDesignerMenu.py in the IDE directory to see examples of menus
being created.
-- Ed Leafe
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message:
http://leafe.com/archives/byMID/[email protected]