[Lazarus] StringGrid

Kamen Ketev kamenlist at abv.bg
Sun Jul 7 02:24:05 CEST 2013


 

Hello, I want to change certain cells in StringGrid. Here is an example, but it changes all cells. Any idea where is wrong?
 
procedure TForm1.StringGrid1Click(Sender: TObject);
var

   
 i, j: integer;
begin

 
 for i := 1 to 4 do

   
 
 for j := 1 to 4 do Begin

     
 
 
 if i=j

       
 
 
 
 then StringGrid1.Font.Style := [fsBold]

         
 
 
 
 else StringGrid1.Font.Style := [];

   
 
 
 StringGrid1.Cells[i,j] := 'StrTest';

   
 end;
end; 
 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130707/bb0db621/attachment-0002.html>


More information about the Lazarus mailing list