[Lazarus] Strange behavior on creationg TMenuItem

Everton Vieira tonvieira at gmail.com
Fri Dec 2 14:59:34 CET 2011


I've just make some like that:

for i := 0 to 10 do
begin
  MenuItem := TMenuItem.Create(Self);
  MenuItem.Caption := 'tst ' + IntToStr(i);
  PopMenu.Add(MenuItem);
  ShowMessage(MenuItem.Name);
end;

Despite the MenuItem is created in the PopMenu, the ShowMessage is showing
blank.

How can a TComponent be created with the Name being blank "".
How can various TComponent being with the same blank Name "".

Att.
Everton Vieira.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20111202/7a48bae5/attachment-0002.html>


More information about the Lazarus mailing list