Autor Beitrag
HollowMan_COS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: So 07.03.04 12:55 
Hallo,

habe ein Problem mit meiner StringGrid. Ich habe in einige Zellen Bilder(TImage) eingefügt. Wenn ich auf das Bild klicke, soll die gesamte Zeile selectiert sein. Wenn ich in Zellen klicke, in denen nichts steht oder nur Text, funktioniert es. Wie bekomme ich das hin, wer kann helfen?

Danke für Eure Hilfe.
rokdd
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 329

Win XP
D6
BeitragVerfasst: So 07.03.04 13:35 
hallo,
verstehe nicht ganz Tstringgrid mit bildern?

ausblenden Delphi-Quelltext
1:
stringgrid.row:=3//4 zeile wird markiert					


rokdd
HollowMan_COS Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: So 07.03.04 21:19 
@rokdd: Danke, für den Tip, werde es gleich ausprobieren melde mich dann wieder.

Das Einbinden von Symbolen ist ganz einfach:

ausblenden Quelltext
1:
2:
TImage.Parent:=StringGrid;
TImage.Rect:=Stringrid.Cell[x,y}.Rect


Brauchte die Bilder für Flaggensymbole.
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 07.03.04 22:58 
@HollowMan_COS

was passiert, wenn das Grid gescrollt wird?

für mich wäre es besser, wenn du die Bilder im Ondrawcell eriegnis selber zeichnest. Dann umgehst du auch Probleme mit der Navigation.
Threads gibts da genug Suche in: Delphi-Forum, Delphi-Library DRAWGRID BILDER Suche in: Delphi-Forum, Delphi-Library STRINGGRID BILDER

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
rokdd
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 329

Win XP
D6
BeitragVerfasst: So 07.03.04 23:08 
@ Keldorn: a) du weißt nicht ob er überhaupt scrollen will/muss
b) gehört das zum Thema? Er wird es schon wissen und wenn es nicht klappt kann er immer noch posten!


Rokdd
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: So 07.03.04 23:10 
rokdd hat folgendes geschrieben:
@ Keldorn: a) du weißt nicht ob er überhaupt scrollen will/muss
b) gehört das zum Thema? Er wird es schon wissen und wenn es nicht klappt kann er immer noch posten!



weils mit dem image auch nicht unbedingt einfacher wird. du mußt ja bei einem klick auf ein image dann wissen, in welcher "Zelle" es steckt um die Zeile zu selektieren.

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
rokdd
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 329

Win XP
D6
BeitragVerfasst: So 07.03.04 23:15 
ja aber er könnte es ja uch so machen:
beim zeichnen weiß er in welche zeile das bild kommen soll. also setzt man den tag des bildes auf die zeile. wird das bild angeklickt markiert es mithilfe des tags den tsringgrid..

rokdd
HollowMan_COS Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 18



BeitragVerfasst: Mo 08.03.04 13:53 
@rokdd : Danke für deinen Tip, hat gefunzt.
@Keldorn: Du hast recht, beim scrollen bleibt das Bild stehen, und überschreibt die anderen Felder, werde mir mal deine Links anschauen, bei Fragen melde ich mich wieder. thx.