- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
void __fastcall TUsers::DBG2DrawColumnCell(TObject *Sender,
const TRect &Rect, int DataCol, TColumn *Column,
TGridDrawState State)
{
const int iIsChecked[2] = {DFCS_BUTTONCHECK | DFCS_FLAT, DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_FLAT};
int DrawState;
TRect DrawRect;
if (State.Contains(gdFocused) == true)
{
if (Column->Field->FieldName == dbchkApplyDoc2->DataField)
{
ShowMessage("Зацикливает :( ");
ShowMessage("Эта надпись будет повторяться бесконечно - почему ???");
}
}
else
{
if (Column->Field->FieldName == dbchkApplyDoc2->DataField)
{
DrawRect = Rect;
InflateRect(&DrawRect, -2, -2); // Matters ?
DrawState = iIsChecked[Column->Field->AsBoolean];
DBG2->Canvas->FillRect(Rect);
DrawFrameControl(DBG2->Canvas->Handle, &DrawRect, DFC_BUTTON, DrawState);
}
}
}