Initialisation d'une TDBGrid !
Bonjour,
Dans mon Application j'utilise ce code pour changer de couleur de fond et de texte en fonction des valeurs entr�es via application et sauvegarder dans un point INI, jusque � la c'est bon le probl�me est le suivant : quand je change les valeurs tous est sauvegarder dans le point INI mais les changement de valeur ne sont pris en compte que si je red�marre l'application alors que je souhaiterais que les changement soit dynamique , m�me en r�-lisant le point INI cela ne marche pas :calim2:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
//---------------------------------------------------------------------------
void __fastcall TForm1::DBG1DrawColumnCell(TObject *Sender,
const TRect &Rect, int DataCol, TColumn *Column,
TGridDrawState State)
{
if (Form1->DBG1->DataSource->DataSet->FieldByName("STOCK")->Value <= Sl)
{
Form1->DBG1->Canvas->Brush->Color = StrToInt(Edit10->Text);
Form1->DBG1->DefaultDrawColumnCell(Rect, 1, Column, State);
}
if (Form1->DBG1->DataSource->DataSet->FieldByName("MAT")->Value == 1)
{
Form1->DBG1->Canvas->Font->Style = Form1->DBG1->Canvas->Font->Style << fsBold;
Form1->DBG1->Canvas->Font->Color = StrToInt(Edit20->Text);//clRed;
Form1->DBG1->DefaultDrawColumnCell(Rect, 1, Column, State);
}
}
//--------------------------------------------------------------------------- |
Comment peut ont appeler la fonction "DBG1DrawColumnCell" manuellement avec par exemple un bouton ?
Merci