Skip to content

Commit

Permalink
fix ATComboEdit popup position
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey-T committed May 29, 2019
1 parent d96d4e6 commit c38e4a0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions atsynedit/atsynedit_edits.pas
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ procedure TATComboEdit.MicromapDraw(Sender: TObject; C: TCanvas;

procedure TATComboEdit.DoMenu;
var
i: integer;
mi: TMenuItem;
P: TPoint;
i: integer;
begin
Update; //control may get focus, need repaint
if FItems.Count=0 then exit;
Expand All @@ -201,7 +202,10 @@ procedure TATComboEdit.DoMenu;
end;
end;

FMenu.PopUp;
P:= Point(Width, 0);
P:= ClientToScreen(P);

FMenu.PopUp(P.X, P.Y);
end;

procedure TATComboEdit.MenuItemClick(Sender: TObject);
Expand Down

0 comments on commit c38e4a0

Please sign in to comment.