AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

FMX TGrid hat keine onMousexxx events?

Ein Thema von softtouch · begonnen am 25. Feb 2025 · letzter Beitrag vom 25. Feb 2025
Antwort Antwort
Benutzerbild von softtouch
softtouch

Registriert seit: 13. Feb 2015
Ort: Kerpen
237 Beiträge
 
Delphi 12 Athens
 
#1

FMX TGrid hat keine onMousexxx events?

  Alt 25. Feb 2025, 14:50
Delphi 12.2: Laut help file sollte das TGrid/TStringGrid von FireMonkey events wie onMouseDown, onMouseMovbe etc. haben, aber ich habe diese nicht, und kann nicht glauben, das es keine gibt. Was ist denn nun falsch, meine Installation oder das help file?
  Mit Zitat antworten Zitat
Benutzerbild von Bernhard Geyer
Bernhard Geyer

Registriert seit: 13. Aug 2002
17.210 Beiträge
 
Delphi 10.4 Sydney
 
#2

AW: FMX TGrid hat keine onMousexxx events?

  Alt 25. Feb 2025, 16:22
Schon mal auf Smartphone/Tablets eine Maus gehabt?
Ein Lib für Mobilgeräte muss nicht unbedingt noch Erweiterung für Mouse-Bedienung haben.
(Bei Checks von Online-Anwendungen werden solche Events mittlerweile als Problem markiert)
Windows Vista - Eine neue Erfahrung in Fehlern.
  Mit Zitat antworten Zitat
Benutzerbild von Uwe Raabe
Uwe Raabe
Online

Registriert seit: 20. Jan 2006
Ort: Lübbecke
11.589 Beiträge
 
Delphi 12 Athens
 
#3

AW: FMX TGrid hat keine onMousexxx events?

  Alt 25. Feb 2025, 16:34
Laut Doku sind die Properties public und sind so auch vorhanden (in TControl deklariert):
Code:
OnMouseDown    public   Occurs when a mouse button is pressed over a control.
OnMouseEnter   public   Occurs when the mouse cursor enters the area of the control.
OnMouseLeave   public   Occurs when the mouse cursor leaves the control area.
OnMouseMove    public   Occurs when the mouse cursor moves while over the control area.
OnMouseUp      public   Occurs when the mouse button that was pressed over the control is released.
OnMouseWheel   public   Occurs when the mouse wheel moves while the control has focus.
Es ist also durchaus möglich, die entsprechenden Events im Code zuzuweisen.
Uwe Raabe
Certified Delphi Master Developer
Embarcadero MVP
Blog: The Art of Delphi Programming
  Mit Zitat antworten Zitat
Benutzerbild von Harry Stahl
Harry Stahl

Registriert seit: 2. Apr 2004
Ort: Bonn
2.541 Beiträge
 
Delphi 12 Athens
 
#4

AW: FMX TGrid hat keine onMousexxx events?

  Alt 25. Feb 2025, 17:46
Bis Delphi Seattle inklusive waren die Events nahezu alle im Object-Inspector zugänglich, danach wurden sie stark dezimiert. Warum, ist mir letztlich auch nicht klar. Gut, für Mobile Plattformen haben die Mouse-Events keine Relevanz, aber unter den Desktop-Plattformen werden Sie doch schon mal benötigt.

Aber wie Uwe schon erwähnte, kann man ein Event manuell zur Laufzeit zuweisen.

Also zB. im Oncreate des Formulars:

grid1.OnMouseMove := grid1MouseMove; Und zuvor manuell in der Form-Deklaration selber ergänzen:

procedure grid1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Single);
  Mit Zitat antworten Zitat
Benutzerbild von dummzeuch
dummzeuch

Registriert seit: 11. Aug 2012
Ort: Essen
1.663 Beiträge
 
Delphi 10.2 Tokyo Professional
 
#5

AW: FMX TGrid hat keine onMousexxx events?

  Alt 25. Feb 2025, 18:08
Es gab durchaus mal Smartphones, die sowas wie einen Mauszeiger hatten, z.B. mein Google Nexus 1.
Das kam dann allerdings schnell aus der Mode.

Und dann gab es die Convertibles auf Android-Basis. Meine Frau hatte mal eines als Notebook-Ersatz, auch das hatte eine Maus bzw. ein Touchpad also auch einen Mauszeiger. Gibt's die noch?

Und zuletzt: Da Google dabei ist, Android und ChromeOS zusammenzuführen, könnte es durchaus sein, dass auch da der Mauszeiger wieder kommt.
Thomas Mueller

Geändert von dummzeuch (25. Feb 2025 um 22:16 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von softtouch
softtouch

Registriert seit: 13. Feb 2015
Ort: Kerpen
237 Beiträge
 
Delphi 12 Athens
 
#6

AW: FMX TGrid hat keine onMousexxx events?

  Alt 25. Feb 2025, 21:38
Laut Doku sind die Properties public und sind so auch vorhanden (in TControl deklariert):
Code:
OnMouseDown    public   Occurs when a mouse button is pressed over a control.
OnMouseEnter   public   Occurs when the mouse cursor enters the area of the control.
OnMouseLeave   public   Occurs when the mouse cursor leaves the control area.
OnMouseMove    public   Occurs when the mouse cursor moves while over the control area.
OnMouseUp      public   Occurs when the mouse button that was pressed over the control is released.
OnMouseWheel   public   Occurs when the mouse wheel moves while the control has focus.
Es ist also durchaus möglich, die entsprechenden Events im Code zuzuweisen.
Ja, das funktioniert nun einwandfrei. Danke.
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:59 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz