Autor Beitrag
Flash106
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Mo 14.03.05 21:12 
Hallo,

wie kann ich per Mouseover den Wert auslesen der Spalte die sich unter der Maus befindet?? Ein Mouseover gibt es ja nicht. Nur Mousmove und so... ???

Danke!!

Bianca
wdbee
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 628
Erhaltene Danke: 1



BeitragVerfasst: Mo 14.03.05 21:52 
Du kannst MouseMove nehmen. Wenn du das OnMouseMoveEvent im Stringrid setzt, dann wird der EventHandler nur aufgerufen, wenn die Maus über deinem Stringrid ist. Die Position des Mauszeiger ist dann in X,Y angegeben und bezieht sich auf die internen Koordinaten deines Grids. Die Zeile bzw. Spalte kannst du dann selbst berechnen.
delfiphan
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2684
Erhaltene Danke: 32



BeitragVerfasst: Mo 14.03.05 21:56 
Zitat:
MouseCoord method (TCustomGrid)
Returns the row and column indexes of the cell that contains a point specified in screen coordinates.
Delphi syntax:
function MouseCoord(X, Y: Integer): TGridCoord;
Description
Call MouseCoord to locate the column and row of the cell which contains a given screen coordinate. Usually, MouseCoord is used to locate the cell that is under the mouse.
Flash106 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 234


D7 Ent
BeitragVerfasst: Mo 14.03.05 22:06 
vielen Dank!!!

:D
bensch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44



BeitragVerfasst: Di 16.09.08 21:13 
ich glaube, hier passt mein problem am besten hinein.

kann man bei delphi in einem stringgrid eine art mouse-over-information einblenden? also wenn ich mit der maus über das stringgrid fahre, dass dann immer in einer kleinen info-box eine beliebige info angezeigt wird?

hier mal ein screenshot meines stringgrids:

Moderiert von user profile iconNarses: Bild als Anhang nochgeladen (1)

ich möchte jetzt quasi für jede zelle eine extra information anzeigen lassen, wenn man die maus kurz über die entsprechende zelle hällt. sollte dann zb. so aussehen:

Moderiert von user profile iconNarses: Bild als Anhang nochgeladen (2)

wie gesagt, ich würde gerne für jede einzelne zelle eine andere information anzeigen lassen. kann mir da jemand weiterhelfen?
Einloggen, um Attachments anzusehen!
hansa
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 3079
Erhaltene Danke: 9



BeitragVerfasst: Di 16.09.08 21:21 
Wie wärs mit ShowCellHint ?

_________________
Gruß
Hansa
bensch
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 44



BeitragVerfasst: Mi 17.09.08 19:28 
danke, das hat mir sehr geholfen. aber ich frage mich, warum ShowCellHint nicht in der delphi-hilfe steht? (habe delphi 6)

bin dann HIER fündig geworden und konnte es auch so einbauen, wie es mir am besten gefallen hat.

aber noch eine nebensächliche frage: kann man jetzt diesen hint-text noch irgendwie zentriert ausrichten? habe in den stringgrid-zellen mehrere zeilen text stehen, und da würde ich den gesamten hint-text gerne irgendwie zentrieren...


gruß bensch
Einloggen, um Attachments anzusehen!