7373
Конференция Delphi SoobCha
письмо # 7374
|
7375 |
|
Здравствуйте, Алексей!ЗАГ>> Подскажите, возможно ли программное выделение цветом ячейки, ЗАГ>> столбца, строки в стандардтном DBGrid? >>OnDraw* есть функция? ЗАГ> Хм... А можно пример что и как? Пример из хелпа делфей, правда, на С, но смысл ясен: The following code uses the bitmaps in an image list component to draw the contents of each cell in a draw grid. It draws a focus rectangle around the cell that has focus. void __fastcall TForm1::DrawGrid1DrawCell(TObject *Sender, long Col, long Row, TRect &Rect, TGridDrawState State) { long index = Row * DrawGrid1->ColCount + Col; DrawGrid1->Canvas->Brush->Color = clNormalBackground; DrawGrid1->Canvas->FillRect(Rect); ImageList1->Draw(DrawGrid1->Canvas,Rect.Left,Rect.Top,index); if (State.Contains(gdFocused)) DrawGrid1->Canvas->DrawFocusRect(Rect); } -- Всего наилучшего, Анатолий mailto:teml@npopm.ru |
7373
|
7375 |
|
|
|
|