Please help me, saya punya masalah bagaimana menjumlahkan garis  horisontal maupun 
vertikal yang sudah dibuat pada stringgrid yang meliputi angka nol. Seperti contoh 
kasus dibawah ini

        A1      B2      C3      D4
A
0       3       4       0
B       2       0       5       6
C       7       6       0       5
D
0       8       3       0
 
Pada stringgrid diatas apabila pada setiap baris terdapat  0 >= 2 maka dibuat garis 
horison, apabila 0=1 maka dibuat garis vertikal, ini ada sedikit program yang saya 
belum bisa menjumlahkan garis tersebut diatas, please help me yach�
procedure TForm1.BGarisClick(Sender: TObject);
  var 
i,g,x1,x2,l,m,y1,y2,baris,kolom,jumlah0,gv,gh,jmlv,jmlh,hor:byte;awal,oke,ver:string;
begin
  oke:='';
  g:=35;
  l:=30;
  x1:=42;
  y1:=35;
  m:=20;
  for baris:=1 to x do
  begin
    gv:=0;
    jumlah0:=0;
    for kolom:=1 to y do
    begin
       awal:=(grid6.cells[kolom,baris]);
       if awal='0' then begin
        jumlah0:=jumlah0+1;
        i:=(35*kolom)+7;
      //  gv:=(gv*kolom)+1;
        end;
    end;
     gh:=0;
    canvas.TextOut(740,10*baris,inttostr(jumlah0));
      if jumlah0>=2 then
      begin
        x2:=x1+((grid6.ColCount)-1)*l;
        grid6.Canvas.MoveTo(x1,g);
        grid6.Canvas.LineTo(x2,g);
        gh:=gh+1;
     end;
     g:=g+25 ;
     canvas.TextOut(750,10*baris,inttostr(gh));
    for kolom:=1 to y do
    if jumlah0 =1 then
    begin
     y2:=y1+((grid6.rowcount)-1)*m;
     grid6.Canvas.MoveTo(i,y1);
     grid6.Canvas.LineTo(i,y2);
   end;
    gv:=(1*kolom)+1;
    canvas.TextOut(760,10*baris,inttostr(gv));
    caption:=oke;
end;
end;


Terimakasih


Eka
-- 
______________________________________________
http://www.linuxmail.org/
Now with e-mail forwarding for only US$5.95/yr

Powered by Outblaze


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA/i7folB/TM
---------------------------------------------------------------------~->

Berlangganan: [EMAIL PROTECTED]
Stop Berlangganan: [EMAIL PROTECTED]
Keluhan Milis(Unbouncing,spam,dll): [EMAIL PROTECTED] 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


Kirim email ke