单击复选框时,我正在向文本框中添加一行。当未单击复选框并想要删除该项目时我应该怎么做:
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
我应该跟踪它在文本框中添加到哪一行以在未选中时将其删除,还是有更好的方法?