TStringGrid Multi selection
Bonjour,
Je réalise une application contenant un TStringGrid.
En fouillant dans le web, je n'ai malheureusement pas trouvé de propriété Multi select.
Du coup, ce que j'ai fait, c'est que j'ai créé un trabeau de boolean qui indique si la ligne doit etre soulignée ou non.
Par contre c'est là où je bloque.
J'ai testé avec le StringGrid1DrawCell, mais je n'arrive pas à ce que je veux.
Avec le code ci-dessous, j'ai tout mon stringgrid de couleur grise 8O
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
procedure TFrmAffectationBoites.StringGrid1DrawCell(Sender: TObject; ACol,
ARow: Integer; Rect: TRect; State: TGridDrawState);
var st:String;
dx,dy:Integer;
i:Integer;
begin
with StringGrid1.Canvas do // Avec le canevas de ton stringgrid
begin
for i:= 0 to Length(bCellule)-1 do
begin
if bCellule[i]=true then
begin
Font.Color:=clwhite;
Brush.Color:=clInfoBK;
end
else
begin
Font.Color:=clNavy;
Brush.Color:=clSilver;
end;
FillRect(Rect);
TextOut(Rect.Left+Dx,Rect.Top+Dy,St);
end; |
Quelq'un aurait-il la solution à mon probleme
Merci d'avance pour votre aide
Cdlt,
Marsup