TPopupMenu.Popup needs x,y position relative to screen, not to form

git-svn-id: trunk@4763 -
This commit is contained in:
micha 2003-11-05 08:32:17 +00:00
parent ed636973a6
commit cc6d8c284e

View File

@ -1116,7 +1116,7 @@ var
Shift: TShiftState; Shift: TShiftState;
SenderParentForm: TCustomForm; SenderParentForm: TCustomForm;
RubberBandWasActive: boolean; RubberBandWasActive: boolean;
ParentClientOrigin: TPoint; ParentClientOrigin, PopupPos: TPoint;
SelectedCompClass: TRegisteredComponent; SelectedCompClass: TRegisteredComponent;
SelectionChanged, NewRubberbandSelection: boolean; SelectionChanged, NewRubberbandSelection: boolean;
@ -1346,7 +1346,8 @@ Begin
PointSelect; PointSelect;
PopupMenuComponentEditor:=GetComponentEditorForSelection; PopupMenuComponentEditor:=GetComponentEditorForSelection;
BuildPopupMenu; BuildPopupMenu;
FPopupMenu.Popup(MouseUpPos.X,MouseUpPos.Y); PopupPos := Form.ClientToScreen(MouseUpPos);
FPopupMenu.Popup(PopupPos.X,PopupPos.Y);
end; end;
DisableRubberBand; DisableRubberBand;