Курсовая работа: Алгоритм, написание и отладка программы "Текстовый редактор"
void __fastcall TForm1::FormShow(TObject *Sender)
{
int i;
for (i=0; i<Screen->Fonts->Count; i++)
{
ComboBox1->Items->Add (Screen->Fonts->Strings[i] ) ;
}
CSpinEdit1->Value=RichEdit1->SelAttributes->Size;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::RichEdit1MouseUp(TObject *Sender,
TMouseButton Button, TShiftState Shift, int X, int Y)
{
if(RichEdit1->Paragraph->Numbering==nsNone)
{SpeedButton19->Down=false;}
if(RichEdit1->Paragraph->Numbering==nsBullet)
{SpeedButton19->Down=true;}
switch (RichEdit1->Paragraph->Alignment)
{case taLeftJustify: SpeedButton17->Down=true; break;
case taCenter: SpeedButton18->Down=true; break;
case taRightJustify: SpeedButton15->Down=true; break;}
if(RichEdit1->SelAttributes->Style==RichEdit1->SelAttributes->Style<<fsBold)
{SpeedButton13->Down=true;}
else{SpeedButton13->Down=false;}
if(RichEdit1->SelAttributes->Style==RichEdit1->SelAttributes->Style<<fsUnderline)
{SpeedButton11->Down=true;}
else{SpeedButton11->Down=false;}
if(RichEdit1->SelAttributes->Style==RichEdit1->SelAttributes->Style<<fsItalic)
{SpeedButton12->Down=true;}