C++builder中想让EDIT中的内容在label中显示怎么写

2024-12-25 13:57:45
推荐回答(2个)
回答1:

void __fastcall TForm1::Button1Click(TObject *Sender)
{
Edit1->Text = Edit1->Text.UpperCase();
this->Caption = Edit1->Text.UpperCase();
}

void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
Edit1->Text = Edit1->Text.LowerCase();
this->Caption = Edit1->Text.LowerCase();
}

回答2:

Label1->Caption = Edit1->Text;