Home Component Writing
New Blog Posts: Merging Reports - Part 1 and Part 2

PopupMenu

edited February 2006 in Component Writing
Greetings,

I have upgraded to RB 10. I have a custom component that I have written for
earlier versions of RB. My question is:

How do I insert a separator line in the components popup menu. The procedure
below has worked in prior versions:

procedure TMyComponentPopupMenu.CreateMenuItems;
begin
inherited CreateMenuItems;
AddItem(0, 'Edit', 'Edit Component...', 0);
AddItem(1, 'Line1', '-', 0); <------------------ Separator
Here
AddItem(2, 'VerticalJustify', 'VerticalJustify', 0);
AddItem(3, 'Show', 'Show', 0);
AddItem(4, 'ShowSpace', 'ShowSpace', 0);
AddItem(5, 'ShowBox', 'ShowBox', 0);
AddItem(6, 'ShowText', 'ShowText', 0);
AddItem(7, 'SpecialStyle', 'SpecialStyle', 0);
AddItem(8, 'Transparent', 'Transparent', 0);
AddItem(9, 'Line2', '-', 0); <------------------ Separator
Here
AddItem(31, 'Line3', '-', 0); <------------------ Separator
Here
AddItem(32, 'ReIntroduce', 'ReIntroduce...', 0);
end;

When displayed the popup menu shows a gray and white box in the icon area
with the following: '1 pl' for the first line, blank for second line and '3
pl' for the third line. The menu item shown for each line is '-'.

Thanks,
Tommy

Comments

  • edited February 2006
    Greetings,

    I asked too quickly!

    I found the AddSeparator function in ppPopupMenus.pas.
    I am able to properly display separators in the popup menu now.

    Regards,
    Tommy


This discussion has been closed.