單擊複選框時,我將一行添加到文本框中。我應該怎麼辦時,該複選框未點擊,要刪除的項目:我試圖從文本框中刪除一行,但不知道確切的行
Private Sub cbAddress_SelectedValueChanged(sender As Object, e As System.EventArgs) Handles cbAddress.SelectedValueChanged
if cbAddress.checked = true then
dim thetext as string = txtTextbox.text
dim theItem as string = "test"
txtTextbox.text = thetext & Environment.NewLine & theItem
else
' i'm try to delete the line.
' I've tried to txtTextbox.text.Remove(blah, blah)
end if
,我應該跟蹤哪些行被添加到文本框中選中時將其刪除,或者是有更好的辦法?
是在文本框中的文本編輯? –