![]() |
| ||
|
|
Новости |
Поиск |
FAQ |
Статьи |
Книги |
Новости VCL
| | Форумы ЧАТ |
Орешник |
|
| |||
| |||
« предыдущая ветвь | форум | следующая ветвь »
Прозрачный bmp в RXdbgrid [D7, WinXP]
Spot © (2010-02-15 09:25:00)Как вывести прозрачный bmp в RXDbgrid
Рисую так:procedure TfMain.GrtekDrawColumnCell(Sender: TObject; const Rect: TRect;
DataCol: Integer; Column: TColumn; State: TGridDrawState);
var
Im1: TBitmap;
grsndr:trxdbgrid;
begin
grsndr:=sender as trxdbgrid;
Im1 := TBitmap.Create;
With grsndr.Canvas do
begin
case DM.DSzakazy.DataSet.FieldByName('sost').AsInteger of
40: Font.Color:=CLred;
41,42: Font.Color:=CLblue;
43,44,45,46: Font.Color:=clgreen;
end;
if (gdSelected in State)
then Brush.Color:=$ccffff
else brush.Color:=clWindow;
if (Column.FieldName = 'vid') and (Column.Field.Text<>'')then
begin
FillRect(Rect);
ILicons.GetBitmap(DM.DSzakazy.DataSet.FieldByName('imageindex').AsInteger, Im1);
BrushCopy(Bounds(Rect.Left, Rect.Top, Im1.Width,
Im1.Height), Im1, bounds(0, 0, Im1.width, Im1.height), clWhite);
TextOut(Rect.Left+Im1.Width, Rect.Top+2, Column.Field.Text);
end
else
begin
FillRect(Rect);
TextOut(rect.Left+2,rect.Top+2,Column.Field.Text)
end;
end;
end;
KilkennyCat (2010-02-15 23:08:00) [1]такая куча кода, а цвет прозрачности не устанавливается.