BCB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BCB] BCB1: Popup Troubles
Do you assign the PopupMenu property of the desired component?
i.e
component->PopupMenu = ToolMenu;
----------
> From: robert_hunt@nospam.nass.usda.gov
> To: bcb-list@nospam.orionlink.net
> Subject: [BCB] BCB1: Popup Troubles
> Date: Friday, April 30, 1999 1:58 PM
>
>
> Dear Builders,
>
> I am trying something new and I am having some trouble getting popup menus to
> work from a component. I have read what is available in the help files and it
> has left me with a puzzle. What I want to have is an extra menu item attached
> to the popup menu that comes up when right clicking on the component which is
> placed on a form. Here's what I have added to the component's constructor:
>
> ToolMenu = new TPopupMenu (this);
> ToolItem = new TMenuItem (this);
> ToolItem->MenuIndex=0;
> ToolItem->Caption="&About ToolOne";
>
> Here's the menu item click event:
>
> void __fastcall TToolOne::TToolItemClick(TObject *Sender)
> {
> ShowMessage("TToolOne 1.2 by Robert Hunt, April 1999");
> }
>
> I seem to be missing some basic understanding of how to do this. Can anyone
> share with me an example or point me to more information?
>
> TIA,
> Robert
> rhunt@nospam.nass.usda.gov
W Komornicki's Home Page |
Main Index |
Thread Index