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

x
?
Solved

Delphi PopupMenu replacing with 3rd party component. (Newbie)

Posted on 2004-10-13
6
Medium Priority
?
681 Views
Last Modified: 2007-12-19
Hi,

I am working on a soure code with TreeView component and with dynamically changing PopupMenu for this TreeView files and folders. However, I am required to change this Popupmenu with a 3d party Popupmenu with more fetaures and customization. I was able to replicate all previous Popupmenu Items onto the new one but the new 3rd party Popupmenu still lacks the basic (enabling/disabling menuitem) options for TreeView items.

I am unable to find information in source code to enable/disable menuitems on new Popupmenu for certain events for TreeView files/folders or even dynamically appearing new popupmenu-items for TreeView-items.

For example: for a TreeView item 'A' right clicking it displays Popupmenu with options (A and B) where 'A' is disabled (to select) and 'B' is enabled. But on new popupmenu both (A and B) are enabled all the time.

Thanks.

- Ad.
0
Comment
Question by:mdadnan
[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
6 Comments
 
LVL 12

Accepted Solution

by:
Ivanov_G earned 150 total points
ID: 12305503
procedure TForm1.ListView1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
var
  crs    : TPoint;
begin
  if (Button = mbRight) then
    begin
      // right mouse button clicked - popup the menu
      GetCursorPos(crs);
      // get the selected item
      if ListView1.Selected.Caption = 'A' then
        begin
          // disable item "Test"
          PopupMenu1.Items.Find('Test').Enabled := False;
          // popup the menu
          PopupMenu1.Popup(crs.X, crs.Y);
        end;
    end;
end;
0
 

Author Comment

by:mdadnan
ID: 12305688
Thank you for your brief explanation. But I know the structure to work out the basics. But I am having problem finding the similar structure (used all possible means) in the original source code for a particular menu item.

My question is should I continue looking in the main sourcecode or menuitem with function can be loaded from a resource file?

Thank you for your reply.
0
 
LVL 12

Expert Comment

by:Ivanov_G
ID: 12316894
> I am required to change this Popupmenu with a 3d party Popupmenu with more fetaures
> and customization

http://www.cooldev.com/coolmenuspro.html
http://www.torry.net/pages.php?id=149
0
 

Expert Comment

by:krypto2000
ID: 12398357
please send the code of your 3rd party popupMenu...
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

598 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