Q&A

  • 스트링그리드에서 특정셀의 내용에따라 그리드에 각기다른 비트맵 나타내기
아래와 같이해보니 안되더군요.
어떻게해야할지 고수님들께 부탁드립니다.
  
  if (ACol = 0) and (ARow <> 0) then
    begin
        //if  (aCol In [4] = 'DIR') then
        if FtpForm.Ftp_Filelist_Grid.Cells[ACol,ARow] = 'DIR' then
                begin
                Rect1 := Classes.Rect(0,0,bmp.Width, bmp.Height);
                Rect2.Left := Rect.Left;
                Rect2.Top := Rect.Top;
                Rect2.Right := Rect.Left + Rect1.Right;
                Rect2.Bottom := Rect.Top + Rect1.Bottom;
                (Sender as TStringGrid).Canvas.BrushCopy(Rect2, bmp, Rect1, clOlive);
                end;
        if FtpForm.Ftp_Filelist_Grid.Cells[ACol,ARow] = '.exe' then
                begin
                Rect1 := Classes.Rect(0,0,wxw.Width, wxw.Height);
                Rect2.Left := Rect.Left;
                Rect2.Top := Rect.Top;
                Rect2.Right := Rect.Left + Rect1.Right;
                Rect2.Bottom := Rect.Top + Rect1.Bottom;
                (Sender as TStringGrid).Canvas.BrushCopy(Rect2, wxw, Rect1, clOlive);
                end;
        if FtpForm.Ftp_Filelist_Grid.Cells[ACol,ARow] = '.htm' then
                begin
                Rect1 := Classes.Rect(0,0,ie.Width, ie.Height);
                Rect2.Left := Rect.Left;
                Rect2.Top := Rect.Top;
                Rect2.Right := Rect.Left + Rect1.Right;
                Rect2.Bottom := Rect.Top + Rect1.Bottom;
                (Sender as TStringGrid).Canvas.BrushCopy(Rect2, ie, Rect1, clOlive);
                end;
    end;
0  COMMENTS