Board index » delphi » Adding menu items in a popup menu

Adding menu items in a popup menu

Hi!

I want to add menu items at run-time in a popup menu.

However, the TPopupMenu component doesn't have any Insert method
as the TMenuItem has, and the Items property is read-only.

How can I do the trick?  (I'm using Delphi 1).

Thanks a lot

Louis-Antoine Blais-Morin
l...@graf.polymtl.ca

 

Re:Adding menu items in a popup menu


On Wed, 11 Sep 1996 16:01:53 -0700, Louis-Antoine Blais-Morin

Quote
<l...@graf.polymtl.ca> wrote:
>I want to add menu items at run-time in a popup menu.

>However, the TPopupMenu component doesn't have any Insert method
>as the TMenuItem has, and the Items property is read-only.

TPopupMenu.Items is of type TMenuItem. The documentation is wrong.
You can insert, etc., using the methods of TMenuItem.
--
Ray Lischner, Author of Secrets of Delphi 2 (Waite Group Press)
Tempest Software, Corvallis, Oregon, USA  http://www.tempest-sw.com

Other Threads