2012-05-19 189 views
0

我有代碼將下拉列表中的值附加到文本框中。但我不確定爲什麼這不在文本框中顯示任何類型的文本。在WindowForms中顯示文本

Try 
    ' Add the selected text to the end of the text already in txtExpression textbox 
    txtExpression.AppendText(cboOpenParen.SelectedText) 
Catch ex As Exception 

Finally 

End Try 

回答

0

你不應該使用.SelectedText屬性...

使用.Text物業....

代碼:

Try 
    ' Add the selected text to the end of the text already in txtExpression textbox 
    txtExpression.AppendText(cboOpenParen.Text) 
Catch ex As Exception 

Finally 

End Try