Вниз
Скачать: 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.01 c
2-1205676755
Res
2008-03-16 17:12
2008.04.13
Cardinal


15-1204535379
Vemer
2008-03-03 12:09
2008.04.13
Ошибка с rtl60.bpl на новойм компьютере.


2-1205950526
Stepper
2008-03-19 21:15
2008.04.13
Почему сие не работает? Бутафорский ProgressBar :)


6-1184903181
DelphiN!
2007-07-20 07:46
2008.04.13
Wake On Lan не всегда срабатывает


2-1205831391
Megatron
2008-03-18 12:09
2008.04.13
Передача параметров




   Наверх