2017-08-31 12 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

这是我的错。我在设置输出时使用了==而不是=。