1

Drawing problem on large popup menu. An Arrow end of the menu not showed and some painting problems

How to solve this problem?

menu items generated with sample code:

 procedure TForm1.Button1Click(Sender: TObject);
 var
   mi:TMenuItem;
   I: Integer;
 begin
   for I := 0 to 100 do
   begin
     mi:=TMenuItem.Create(PopupMenu1);
     mi.Caption:='Item '+IntToStr(I);
     PopupMenu1.Items.Add(mi);
   end;
end;

Sample images:

End of popup menu without style (Native)

Menu without style

End of popup menu with style

Menu with style

When click arrow place on the menu:

Drawing problems

Full screen Image:

enter image description here

Edit :

-Delphi XE3

-Full screen menu image added.

zgn
  • 315
  • 2
  • 11
  • OT: *How to solve this problem?* Have a smaller menu. Nobody wants to scroll through that many items ;-) Btw. which version of Delphi do you use? Could you add a Delphi version tag into your question? – TLama May 21 '15 at 10:34
  • Not a smaller menu. images cropped. 100 menu items added. Delphi version XE3 – zgn May 21 '15 at 10:42
  • That same problem could sometimes occur on normal menues (no styles used). I remember seing similar error (vertical lines) on Windows start menu with lots of elements and scrolling enabled. But the problem didn't always occur. When scroling in smaller incements this problem never showed. it only showed sometimes when scrolling for longer periods. – SilverWarior May 21 '15 at 10:46
  • 100 menu items on a menu is simply wrong, and to expect them to behave properly is unrealistic. Sub-menus (and the ability to nest them within another sub-menu) were specifically invented to prevent having to put so many items in a menu, and expecting a user to scroll through that many items is ludicrous. *Doctor, it doesn't hurt when I tap my finger on the table, but it really hurts when I drop the table on it. Why?* When you do something incredibly wrong for the designed use of something, you shouldn't be surprised when it doesn't work exactly as you'd expect. – Ken White May 21 '15 at 14:13
  • in reality i have 60 menu items. 100 menu items for a sample application, and windows manage 100 + over many items without any problem. This is a VCL Style bug. – zgn May 22 '15 at 06:09

1 Answers1

1

Problem Fixed by @RRUZ

You can update from: https://github.com/RRUZ/vcl-styles-utils

zgn
  • 315
  • 2
  • 11