Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by AlexII,
6. Dez 2013
procedure TForm1.MenuImageClick(Sender: TObject);
var
X,Y: integer;
pos: TPoint;
begin
GetCursorPos(pos);
X:=pos.X;
Y:=pos.Y;
MenuSettingsPopupMenu.Popup(X, Y);
end;
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by AlexII,
6. Dez 2013
Auch du meine Güte... :roteyes:
Ich glaube ich muss mir was anderes suchen, die Maus- bzw. Cursorkoordinaten... geht bestimmt einfacher!
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by AlexII,
6. Dez 2013
Danke Dir!
Verstehe ich soweit, aber wie kann ich die zwei Methode miteinander verknüpfen, das kapiere ich nicht... :gruebel:
Ich habe dann für x und y je zwei Koordinaten... :gruebel:
MenuSettingsPopupMenu.Popup(x, y);
YourImage.ScreenToClient(0,0);
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by AlexII,
5. Dez 2013
Hat den ClientWidth eine Breite? Wie komme ich auf sie?
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by AlexII,
5. Dez 2013
Meinst Du etwa so?
MenuSettingsPopupMenu.Popup(Self.MenuImage.Left + (Self.MenuImage.Width/2), Self.MenuImage.Top + (Self.MenuImage.Height/2));
Bringt auch nichts, das PopupMenü richtet sich trotzdem an die Bildschirmrände...
Forum: GUI-Design mit VCL / FireMonkey / Common Controls
Delphi
by AlexII,
5. Dez 2013
Hallo,
ich möchte ein PopupMenü mit der linken Maustaste, wenn ich auf ein Image klicke, öffnen. Dafür errechne ich wie folgt die Position des PopupMenüs so das es sich genau in der Mitte des Images öffnet auf das ich klicke:
procedure TForm1.MenuImageClick(Sender: TObject);
begin
// Menu / Settings Menü aufklappen
MenuSettingsPopupMenu.Popup(Form1.Left + Form1.MenuImage.Left +...