|
This is very simple, with the code given to you at the bottom, ha ha
Only need to change the code of the PageControl1Change event
void __fastcall TForm1::PageControl1Change(TObject *Sender)
{
if(PageControl1->ActivePageIndex==2)
{
int k0,k;
k0=TabSheet1->Caption.ToIntDef(0)+TabSheet2->Caption.ToIntDef(0);
k=k0/5;
switch (k)
{
case 2: TabSheet3->Caption=IntToStr(k0)+"__优";
break;
case 1: TabSheet3->Caption=IntToStr(k0)+"__中";
break;
default: TabSheet3->Caption=IntToStr(k0)+"__差";
}
}
} |
|