hi friends,
i have developed a new class menuobject to generate menu for my applications. with this object you can easily manage shortcut/system/top-level menus. refer the following snapshots to see how it will help us to save time from creating various menus for your application. please try it.. complete documentation is available with attachment.

what is menuobject?
menuobject is a customized class to create system/shortcut/top-level menus.


with this class you can easily create menus for your application. it’s very simple to use. followings are some key features of this class.

menu re-usability
scenario: in my applications, i always give an edit menu with basic edit functionalities. also i would like to give a shortcut menu with same edit functionalities for every editable controls like editbox, textbox etc.  but i don’t want to create multiple mnx files for system menu and shortcut menu.
solution: with menuobject class you can call same system edit popup as a shortcut menu without any code changes.

see following image to see how its works

combine multiple menu pop-up into once.
you can easily combine multiple menu pop-up and bars into one.

see following image to see how its works. (combined 2 menu items(new and open) from file menu with edit menu and displayed as a shortcut menu)

•set menu properties at runtime
scenario: in one of my application, i displayed a list of customers in a listbox control. user can right click on each customer to view advanced options. in that shortcut menu i want to display currently selected customer name with “open account” menu. means if user right clicks on customer “jack sparrow”, a shortcut menu should appear with a menu “open jack sparrow’s account” or “edit jack sparrow’s contact information”.
solution:  with this class i can easily change my open_accnt menu’s prompt property at runtime and i can display whatever i need.

this.menuobject1.setproperty ("opn_accnt", “prompt”, “open “ + lc_customer + “’s account”)
this.menuobject1.setproperty (2, “prompt”, “edit “ + lc_customer + “’s contact information”)

see following image to see how its works

how to create menu with menuobject?
use newmenu() to create a new menu item
this.menuobject1.newmenu("mnu_fil",, "\<file")
this.menuobject1.newmenu("mnu_new", "mnu_fil","\<new...",,,,,"@_mfi_new")
this.menuobject1.newmenu("mnu_opn", "mnu_fil", "\<open..",,,,,"@_mfi_open")
this.menuobject1.newmenu("mnu_cls", "mnu_fil", "\<close")
this.menuobject1.newmenu("mnu_sas", "mnu_fil", "\<save as...",,,,)
this.menuobject1.newmenu("mnu_ext", "mnu_fil", "\<exit")

you can download this class from below link


Leave a Reply

Your email address will not be published. Required fields are marked *