Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to copy a menu in IDE

Posted on 2002-03-03
3
Medium Priority
?
192 Views
Last Modified: 2010-04-05
I have an old form that has a TPopupMenu on it.
I have created a new form to which I need to copy the TPopupMenu.

I selected the TPopupMenu on the old form, Pressed Ctrl-C clicked on the new form and pressed Ctrl-V. The TPopupMenu appeared in the new form - ok so far.

Now here's the problem:

No matter how I try to assign methods in the new form to the OnClick event of the TPopupMenu's menu items I cannot get the events to actually fire. I.e. the code in the methods attached to the events is never executed.

If I add a new menu item then I can configrre the OnClicked event for that new item no problem. If I delete an existing menu item and re-add it I can configure the OnClicked event no problem - I just cannot configure the OnClicked event for menuitems that were copied along with the TPopupMenu.

I have compared the .dfm files for both the new and old forms and I can't see any difference in the definitions for the TPopupMenu or the menu items.

What have I done wrong - should I be able to copy TPopupMenus in this manner?

Regards
Paul
0
Comment
Question by:zebada
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 1

Accepted Solution

by:
shibin78 earned 400 total points
ID: 6838564
I have just tried as you said, it's all ok under my delphi 5.0 update pack 1. What is your delphi version ? If you can share your code is better.
0
 
LVL 6

Author Comment

by:zebada
ID: 6907927
I tried a few small example programs and like you say, they seem to work OK.

I guess it must be something wierd I am doing in my application. I will try to hunt it down and post a more detailed/accurate description of what/why it doesn't seem to work.

Regards
Paul
0
 
LVL 6

Author Comment

by:zebada
ID: 6924197
I can't reproduce the problem now.
You're right it seems to work fine.

Thanks for taking the time to reply :)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question