Autor Beitrag
spongeBHV
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Sa 16.12.06 14:37 
hallo. möchte in einem stringgrid die zweite spalte als fixedcol haben und nicht die erste. geht das, und wenn ja, wie?
spongeBHV Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 34



BeitragVerfasst: Sa 16.12.06 15:01 
noch besser wäre, wenn des stringgrid zählen würde, wie viele zellen in der zeile nach der fixierten spalte noch ausgefüllt sind und diesen wert dann dort ausgibt.

kann das jemand?
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: Sa 16.12.06 16:57 
Hallo,

user profile iconspongeBHV hat folgendes geschrieben:
hallo. möchte in einem stringgrid die zweite spalte als fixedcol haben und nicht die erste. geht das, und wenn ja, wie?
ja.

FixedCols auf 2 setzen, das Zeichnen des StringGrids in OnDrawCell selbst übernehmen(DefaultDrawing := False) und nur die zweite Spalte so zeichnen, das es wie eine Fixierte aussieht.
Will man in der ersten Spalte editieren können, muss man einen eigenen Inplace-Editor (z.B. ein Editfeld) bei Bedarf anzeigen.

Das StrinGrid zählt nicht von alleine :wink: ,
aber das kann man an geeigneter Stelle, z.B. in OnSetEditText, einbauen.

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