圣人也会出错,希望大家不要BS别人。我们在这里讨论讨论就好了。关于MenuItem的BUG:
使用下面的组建(直接拷贝后粘贴在窗体上),运行后你会发现菜单的分割条画出超出界限了.
经过检查,此问题在Delphi 6 和 BDS 2006 均存在.object ImageList1: TImageList
  Left = 128
  Top = 72
end
object PopupMenu1: TPopupMenu
  Images = ImageList1
  Left = 160
  Top = 72
  object asdfasdf11: TMenuItem
    Caption = 'asdfasdf'
    ImageIndex = 1
  end
  object asdfasdf12: TMenuItem
    Caption = 'asdfasdf'
    ImageIndex = 1
  end
  object asdfasdf13: TMenuItem
    Caption = 'asdfasdf'
    ImageIndex = 1
  end
  object asdfasdf14: TMenuItem
    Break = mbBarBreak
    Caption = 'asdfasdf'
    ImageIndex = 1
  end
  object N3: TMenuItem
    Caption = '-'
    ImageIndex = 1
  end
  object asdfasdf15: TMenuItem
    Caption = 'asdfasdf'
    ImageIndex = 1
  end
  object N4: TMenuItem
    Caption = '-'
    ImageIndex = 1
  end
  object asdfasdf16: TMenuItem
    Caption = 'asdfasdf'
    ImageIndex = 1
  end
  object asdfasdf17: TMenuItem
    Caption = 'asdfasdf'
    ImageIndex = 1
  end
end
object Edit1: TEdit
  Left = 128
  Top = 104
  Width = 121
  Height = 21
  PopupMenu = PopupMenu1
  TabOrder = 2
  Text = 'Edit1'
end解决办法如下(仅适用于Delphi 6):
打开Menus.pas 文件,定位到 1091 行,将本行和1092行替换成:
        GlyphRect.Left := ARect.Left - 2;
        GlyphRect.Right := ARect.Left - 1;
然后把修改后的Menus加入到工程中即可。
BDS2006 Menus.pas 对应的行为: 1154,修改方法同上.