Autor Beitrag
Bronstein Threadstarter
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: Sa 18.11.06 13:04 
Das ergibt die Auswertung des Schichtplaners. Sprich wieviel Personen am Tag anwesend sind, zu den einzelnen Schichten zusammengefasst.

_________________
Es gibt keine dummen Fragen nur dumme Antworten!!!
Bronstein Threadstarter
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 12:45 
Jetzt habe ich aber doch noch ein Problem. Habe jetzt folgenden Code in das DrawCell Ereignis gemacht, damit ich Zellen markieren kann:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
//notwendig für die Markierung
  if (Selection.Left <= ACol) and (Selection.Right >= ACol) and (Selection.Top <= ARow) and (Selection.Bottom >= ARow) 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!!!
Lannes
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 2352
Erhaltene Danke: 4

Win XP, 95, 3.11, IE6
D3 Prof, D4 Standard, D2005 PE, TurboDelphi, Lazarus, D2010
BeitragVerfasst: Mi 22.11.06 15:25 
Hallo,

wir kommen hier so langsam aber sicher sehr weit vom Thema ab(scrollen >> selectieren),
mach doch lieber ein neues Thema auf :wink:

Vorschlag:

Titel 1: [StringGrid] selectieren von nicht zusammenhängenden Zellbereichen

oder wenn Du nur einfärben willst(was ich annehme)
Titel 2: [StringGrid] einfärben von Zellbereichen mit Strg + Maus

zum Code:
ausblenden Delphi-Quelltext
1:
if (Selection.Left <= ACol) and (Selection.Right >= ACol) and (Selection.Top <= ARow) and (Selection.Bottom >= ARow) then					
diese If-abfrage ist imho mit folgendem gleichzusetzen:
ausblenden Delphi-Quelltext
1:
2:
if gdSelected in State then
 //mach was
außerdem ist die Einfärbung nur temporaer, solange der Bereich selectiert ist.

_________________
MfG Lannes
(Nichts ist nicht Nichts) and ('' <> nil ) and (Pointer('') = nil ) and (@('') <> nil )