Newsgroups : Borland : borland.public.delphi.rtl.win32 : 2006 Dec : Creating PopUp menus from one place in the application
| Subject: | Creating PopUp menus from one place in the application |
| Posted by: | "Sasa Mihajlovic" (offi..@msdinfo.com) |
| Date: | Fri, 8 Dec 2006 09:32:49 |
Hi Developers,
I have a small problem with popup menus, but it os not only popup menus
only it is object creation problem, and I'll try to descibe this on
popup example!
1. I have Print button in all of my forms into my application
2. When end user click on Print button it open PopUp menu with few
options for printing
3. I have procedure which create popup menu at OnCreate evevnt of every
form
4. When I need to implement some new funkcionality to this PopUp nenus,
for example delimiter lines, I must edit all procedures in all forms
Here is my problem:
I would like to made one unique procedure into DataModule (for example)
which is used by all forms, and those created menu to transfer to form
which is need it, and when I open another form, DM procedure create new
menu and pass to that another form, without any changes into first
form, that is mean, when form is opened and send request for menu it
get menu and break any connection with menu creation in the DataModule
and continue to use that popup menu!
I hope that I represent my problem coractly, thaks for all help! ;o)