Autor Beitrag
Bronstein
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 578
Erhaltene Danke: 1

WIN XP
Delphi 6 / Delphi 2006 / Delphi XE
BeitragVerfasst: Mi 22.11.06 16:09 
Habe folgenden Code in das DrawCell Ereignis gemacht, damit ich Zellen markieren kann:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
if gdSelected in State then
begin
  Canvas.Brush.Color := TColor(Integer(Canvas.Brush.Color) xor $00FFFFFF);
  Canvas.FrameRect(Rect);
end;


Jetzt kann ich aber nur Zellen markieren die hintereinander kommen. Ich möchte aber mit Hilfe der STRG-Taste z.B. die Zelle [5, 5] und die Zelle[7, 9] markieren

_________________
Es gibt keine dummen Fragen nur dumme Antworten!!!
Gausi
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 8553
Erhaltene Danke: 479

Windows 7, Windows 10
D7 PE, Delphi XE3 Prof, Delphi 10.3 CE
BeitragVerfasst: Mi 22.11.06 16:15 
Soweit ich weiß, bietet das normale StringGrid diese Funktionalität nicht. Da würde nur ein Umstieg auf eine andere Komponente helfen. Der VirtualStringTree kann das auf jeden Fall.

_________________
We are, we were and will not be.
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: Mi 22.11.06 16:42 
Hallo,
in der DP hat Sakura eine Komponente geschrieben:
www.delphipraxis.net...highlight=stringgrid

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)