O ooooh Unregistered / Unconfirmed GUEST, unregistred user! 2006-03-15 #1 我想将popmenu的弹出限定在label或其它控件的左下角,如何写?
L liyinwei Unregistered / Unconfirmed GUEST, unregistred user! 2006-03-16 #5 procedure TForm1.Label1Click(Sender: TObject); var ptObject: TPoint; begin ptObject := TLabel(Sender).Parent.ClientToScreen(Point(TLabel(Sender).Left, TLabel(Sender).Top + TLabel(Sender).Height)); PopupMenu1.Popup(ptObject.X,ptObject.Y); end;
procedure TForm1.Label1Click(Sender: TObject); var ptObject: TPoint; begin ptObject := TLabel(Sender).Parent.ClientToScreen(Point(TLabel(Sender).Left, TLabel(Sender).Top + TLabel(Sender).Height)); PopupMenu1.Popup(ptObject.X,ptObject.Y); end;