I want to remove SelectedText by using a button click event but I just can't seem to figure out how to.
I've tried the following code, but it didn't work:
Public
Sub CancelToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles CancelToolStripMenuItem.Click Me.ComboBox1.SelectedText.Remove(1)End Sub

Remove selected text from a combobox...But how??!!
sharpdotnet2005
If you are wanting to clear the selected value, set SelectedIndex = -1. Note that on previous versions of .Net you would need to set it to 0 (selecting the first item) and then turn around and set it to -1 due to a bug in the control.
Additionally, you may need to add a blank item to the list (or data source) to allow for binding to no value.
http://devauthority.com/blogs/jwooley/default.aspx
VandB
The SelectedText property returns a string, which you're calling methods on. As strings are immutable, any method that modifies a string returns a new string, in this case a string is returned, and you do nothing with it.
Me.ComboBox1.Text = Me.ComboBox1.SelectedText.Remove(1)
If you want to remove the text from the combo boxes items, you need to go through the items collection, find it and remove it. If you want to just clear the selected text, just set the text property to ""
ultrabit79
thanks sir, but it doesn't work. could you suggest an alternative
nathan