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

Прозрачный bmp в RXdbgrid   Найти похожие ветки 

← →
Spot   (2010-02-15 09:25) [0]

Как вывести прозрачный 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) [1]

такая куча кода, а цвет прозрачности не устанавливается.



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

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



Память: 0.44 MB
Время: 0.072 c
11-1220430650
Dodfr
2008-09-03 12:30
2010.08.27
strange form behavior for Form and TabControl


15-1269517786
DVM
2010-03-25 14:49
2010.08.27
Забавная SQL Injection


2-1266580325
NovichoK111
2010-02-19 14:52
2010.08.27
TreeView


2-1267008672
Nilman
2010-02-24 13:51
2010.08.27
CreateProcess и права пользователя


2-1273148921
ИванВ
2010-05-06 16:28
2010.08.27
ScrollBar




   Наверх