Hi,
I'm working with Delphi XE2 and I want to add specific filenames in the popup menu of the Tsskinprovider.syssubmenu. I have created the popup menu during design tzime with 2 other items and in the create routine of the form I check for the existing files. For every file I add one item:
if sf.Files.Count > 0 then
begin
for i := 0 to sf.Files.Count-1 do
begin
item := TMenuItem.Create(self);
item.OnClick := mnuFileItemClick;
item.Caption := ChangeFileExt(ExtractFileName(sf.Files.Strings),'');
MainPopMenu.Items.Add(item);
end;
end;
MainPopMenu is assigned to skinprovider syssubmenu
When I start the program, the added items are not shown, only the two items which I added at design time. If I popup the popupmenu by code, it shows all items. During the tests I also noticed that when you assign the popup menu to syssubmenu by code rather than design time, it won't show up.
Thanks & Regards
skippy