Вниз
Скачать: CL | DM;

Bitmap в Grid   Найти похожие ветки 

← →
Pos Eleptant (c)   (2008-02-28 14:01) [0]

Подскажите код, как отразить Bitmap в ячейке Grid

OnDBGridDrawColumnCell не работает

  if Column.FieldName="UPD_STATUS" then
  if Column.Field.AsInteger = 0 then
  begin
showmessage("2");
    dbgrid.canvas.Draw(Rect.Left, Rect.Top, imgFlagEdit.Picture.Bitmap);
    dbgrid.
  end;


← →
Desdechado ©   (2008-02-28 15:03) [1]

procedure TframeTree.ObjGridDrawColumnCell( Sender: TObject; const Rect: TRect;
                                           DataCol: Integer; Column: TColumn;
                                           State: TGridDrawState );
var
 nImg: Integer;
begin
 if not TDBGrid(Sender).DataSource.DataSet.IsEmpty then begin
   if( Column.FieldName = "CLASS_ID" ) then begin
     ObjGrid.Canvas.FillRect( Rect );
     nImg := Column.Field.AsInteger;
     DataModule.ClassImg.Draw( ObjGrid.Canvas, Rect.Left + 2, Rect.Top, nImg );
   end
   else
     ObjGrid.DefaultDrawColumnCell( Rect, DataCol, Column, State );
 end;
end;



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.45 MB
Время: 0.009 c
2-1205775125
johnsmith
2008-03-17 20:32
2008.04.13
Имя поля в наборе данных


15-1204055076
Kerk
2008-02-26 22:44
2008.04.13
Ненавижу TurboD2006!


2-1205752151
Dima
2008-03-17 14:09
2008.04.13
Чем заменить listbox


2-1206006900
Aleksandr
2008-03-20 12:55
2008.04.13
ID folder


15-1204028231
Sairex
2008-02-26 15:17
2008.04.13
Подскажите уважаемые мастера...




   Наверх