🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.misc
Article #64

How to dynamically add a menuitem in run-time ?

#64
From: Chow Hoi Ka, Eric
Date: Sat, 17 Apr 1999 00:00
38 lines
2278 bytes
Hello,

How to dynamically add a menuitem in run-time ?
And if it is possible, how to dynamically add the action-event(Click)
for it ?

For example,
The following is the Menu structure :

[Edit]
Undo
Cut
other_Menu_Item

My main question is that how can I dynamically add the other_menu_item
in thge Edit menu in run-time and with the Click Event?
If I don't know how many "other_Menu_Item" will be added in the design
time, how to implement this with Click Event?


Would you please to give me a simple example about this ????

Best regards,
Eric



--
     _                                                  _
    / ) |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ( \
   / /  |                                            |  \ \
 _( /_  | _   Chow Hoi Ka, Eric                    _ |  _) )_
(((\ \> |/ )                                      ( \| </ /)))
(\\\\ \_/ /   E-Mail : d951686@sftw.umac.mo        \ \_/ ////)
 \       /                                          \        /
  \    _/     http://www.sftw.umac.mo/~d951686/      \_     /
  /   / |____________________________________________| \    \
 /   /                                                   \    \
Technical Details
Message-ID: <371863FB.28DA658E@sftw.umac.mo>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fd817,8c4b696a74ad7796,start
X-Google-Attributes: gidfd817,public
X-Google-Thread: 1043cf,8c4b696a74ad7796,start
X-Google-Attributes: gid1043cf,public
X-Google-Thread: 10baee,8c4b696a74ad7796,start
X-Google-Attributes: gid10baee,public
X-Google-Thread: 115d96,8c4b696a74ad7796,start
X-Google-Attributes: gid115d96,public
From: "Chow Hoi Ka, Eric" <d951686@sftw.umac.mo>
Subject: How to dynamically add a menuitem in run-time ?
Date: 1999/04/17
Message-ID: <371863FB.28DA658E@sftw.umac.mo>
X-Deja-AN: 467536365
Content-Transfer-Encoding: 7bit
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: news@umacss2.umac.mo
X-Trace: umacss2.umac.mo 924344404 1078 161.64.3.185 (17 Apr 1999 10:20:04 GMT)
Organization: University of Macau
Mime-Version: 1.0
Reply-To: d951686@sftw.umac.mo
NNTP-Posting-Date: 17 Apr 1999 10:20:04 GMT
Newsgroups: comp.lang.pascal.delphi.misc,alt.comp.lang.borland-delphi,borland.public.delphi.database,borland.public.delphi.objectpascal