![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Как позволить в одном из полей DBGrid выводить картинки? [D6]
Sergy © (2002-11-28 16:16:00)Как позволить в одном из полей DBGrid выводить картинки?
MsGuns (2002-11-28 20:48:00) [1]Можно еще и так
procedure TfrmPlatezka.grPlatProvDrawColumnCell(Sender: TObject;
const Rect: TRect; DataCol: Integer; Column: TColumn;
State: TGridDrawState);
begin
if (Column.FieldName="PRVNFl") and (Column.Field.AsString>"") then
dmBank.imlGrids.Draw(TDBGrid(Sender).Canvas,Rect.Left,Rect.Top,8);
end;
Sergy (2002-11-28 17:13:00) [2]спасибо
BorisUK (2002-11-28 17:05:00) [3]procedure TForm1.DBGrid1DrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var Im1: TBitmap;
begin
Im1:=TBitmap.Create;
if (Column.FieldName="VenueNo" ) then begin
with DBGrid1.Canvas do begin
Brush.Color:=clWhite;
FillRect(Rect);
if (Table1.FieldByName("VenueNo").Value=1)
then begin
ImageList1.GetBitmap(0,Im1);
end else begin
ImageList1.GetBitmap(2,Im1);
end;
Draw(round((Rect.Left+Rect.Right-Im1.Width)/2),Rect.Top,Im1);
end;
end;
end;
Sergy (2002-11-28 16:55:00) [4]Я прекрасно знаю что, это на событие OnDrawColumnCell происходит прорисовка ячеек, но как туда картинки вместо значений вставить?
Просто я найти не смог в конфе ответ, если несложно, то подскажите топик.
vopros (2002-11-28 16:55:00) [5]Щас ссылку на Королевство Дельфи дадут
Johnmen (2002-11-28 16:51:00) [6]OnDrawColumnCell
Все знают, но вопрос уже задолбал...:)
Sergy (2002-11-28 16:49:00) [7]Ни уж то никто не знает?