I have a krypton combo box which I data bind with a list of key-value pairs. What's happening is that when I set the selected item in code, it is highlighting the text. How can I prevent this or deselect the text?
I've tried the following:
// 1
combo.Select(0,0);
// 2
combo.Focus();
anotherControl.Focus();
// 3
combo.SelectionStart = 0;
combo.SelectionLength = combo.Text.Length;
// 4
combo.SelectionStart = combo.Text.Length;
combo.SelectionLength = 0;
Nothing seems to work. Any help is appreciated.
Try this out
Regarding your problem with focus: (MSDN)
So strange; why the following didn't work: