Einzelnen Beitrag anzeigen

Benutzerbild von Lannes
Lannes

Registriert seit: 30. Jan 2005
Ort: Münster
745 Beiträge
 
Delphi 3 Professional
 
#4

Re: Startbutton mit Menu oberhalb

  Alt 14. Okt 2005, 17:13
Hallo,

Delphi-Quellcode:
var pos : TPoint;
    i,z : Integer;
begin
  i := 0;
  for z := 0 to PopupMenu1.Items.Count-1 do
    if TMenuItem(PopupMenu1.Items[z]).Caption = '-then
      inc(i,9)
      else
        inc(i,17);
  pos.x := Button1.Left;
  pos.y := Button1.Top-i-(2*3);
  pos := Form1.ClientToScreen(Pos);
  PopupMenu1.Popup(Pos.x,pos.y);
end;
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )
  Mit Zitat antworten Zitat