Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

ContextMenu for component

sziszi81sziszi81 Member Posts: 80
Hi,

i created a component, which is invisible (like TTable or such) and i want to attack a context menu to it, like when i right-click on it in design time there will be a "Settings..." item which shows a settings window if i click on it. How can i do that?

Comments

  • zibadianzibadian Member Posts: 6,349
    : Hi,
    :
    : i created a component, which is invisible (like TTable or such) and i want to attack a context menu to it, like when i right-click on it in design time there will be a "Settings..." item which shows a settings window if i click on it. How can i do that?
    :
    :
    Create a new TComponentEditor for that class. Then override GetVerbCount() , GetVerb(), and ExecuteVerb() to add the verb to the context menu (including its implementation). And finally register the new editor with the Delphi IDE using RegisterComponentEditor().
Sign In or Register to comment.