🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #6259

Re: Dynamically Add Items to a PopupMenu

#6259
From: Martin Nijhoff
Date: Tue, 31 May 2005 13:51
15 lines
1137 bytes
First, create a new TMenuItem object (specify your popup menu as the owner):

    TMenuItem *NewItem = new TMenuItem(MyPopupMenu);

Then, set the menu item's properties:

    NewItem->Caption = "New item";

Finally, add the menu item to the popup menu:

    MyPopupMenu->Add(NewItem);

Hope this helps,

Martin
Technical Details
Message-ID: <429c6bc8@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <429c3537@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,b11947d4646f5a8c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Martin Nijhoff" <dont@mail.me>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <429c3537@newsgroups.borland.com>
Subject: Re: Dynamically Add Items to a PopupMenu
Date: Tue, 31 May 2005 15:51:57 +0200
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 80.100.129.156
Message-ID: <429c6bc8@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1117547464 80.100.129.156 (31 May 2005 06:51:04 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail