2017-08-31 18 views
-1

好吧,所以當按鈕打開和關閉它應該輸出到richtextbox,但它不輸出任何東西。消息框消失了,但richtextbox沒有任何反應。CLR - 字符串不輸出到文本框

private: System::Void flatToggle1_CheckedChanged_1(System::Object^ sender) { 
if (flatToggle1->Checked == true) { //Until marked area is for when button is turned on. 
    MessageBox::Show("true"); 
    startstop->Text = L"Stop"; 
    if (Output->Text == "") { 
     Output->Text == L"Started looking for groups!"; 
    } 
    else { 
     Output->Text == L"\nStarted looking for groups!"; 
    } //Marked area 
} 
else { //Until marked area if for when button is turned off 
    MessageBox::Show("false"); 
    startstop->Text = L"Start"; 
    if (Output->Text == "") { 
     MessageBox::Show("Attempting to stop without n"); 
     Output->Text == L"Stopped looking for groups"; 
    } 
    else { 
     MessageBox::Show("Attempting to stop with n"); 
     Output->Text == L"\nStopped looking for groups!"; 
    } 
} //Marked area 

}

+0

改爲使用[Lines](https://msdn.microsoft.com/en-us/library/system.windows.forms.textboxbase.lines.aspx)屬性。 – Ron

回答

0

這是我的錯。我在設置輸出時使用了==而不是=。