const int DEFAULT = 10;
//---------------------------------------------------------------------------
void __fastcall TChartForm::edtTextChange(TObject *Sender)
{
int Length = Image1->Canvas->TextWidth(edtText->Text);
edtText->Width = DEFAULT + Length;
}
//---------------------------------------------------------------------------