Private Sub UltraCombo1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles UltraCombo1.KeyDown If e.KeyData = Keys.Control + Keys.F2 Then e.Handled = True Me.UltraCombo1.SelectedText = "%" End If End Sub
Hereby he returns to me the value "%" when I pulsate contrl F2.
Private Sub UltraComboEditor1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles UltraComboEditor1.KeyDown If e.KeyData = Keys.Control + Keys.F2 Then e.Handled = True Me.UltraComboEditor1.SelectedText = "%" End If End Sub
Hereby he does not return to me the value "%". He returns the following mistake to me
Excepción no controlada del tipo 'System.StackOverflowException' en Infragistics2.Win.UltraWinGrid.v10.3.dll
how I can return the value "%" without the error?
Thank you
Hi,
I tried this out and it works fine for me. I do not get any exception. I have attached my sample project here so you can try it out.
sorry the mistake takes place with UltraCombo1_KeyDown
thanks
I have attached a new sample with both UltraComboEditor and UltraCombo and I am unable to reproduce any exception with either of them. They both work fine.
Perhaps you could post a small sample project that demonstrates the exception you are getting.
Sending file
Alejandro,
¿Sirve eso para Ud.?
I'm not sure I understand exactly what you want. Do you want to add the "%" sign to the text that is in the textbox? Could you look at the revised version of the sample that is attached to the forum thread and tell me if this is what you want?
No estoy seguro que comprendo exactamente lo que Ud. quiere. ¿Quiere añadir este signo "%", al texto que está en el textbox? ¿Podría Ud. mirar a la prueba revisada que he añadido a este hilo y déjame saber si hace lo que Ud. quiere?
Private Sub UltraCombo1_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles UltraCombo1.KeyDown
e.Handled =
True
' Me.UltraCombo1.SelectedText = "%"
UltraCombo1.SelectionLength = 0
UltraCombo1.SelectionStart = Len(
Me.UltraCombo1.Text)
End If
Ultracombo1.text = "%" does not serve me because me overwrite the content of the field for %. With the text I have to add the text of ultracombo1 and position the cursor at the end of the text.
With selectectext it does it automatic
I did get the exception when I typed Ctrl/F2 with the UltraCombo. I did not get the exception with the UltraComboEditor. Have you tried setting the "Text" property instead of the "SelectText" property of the UltraCombo? Like so:
Me.UltraCombo1.Text = "%".
Could you let me know if that works for you?
Yo ví la excepción cuando tecleé ctrl/F2 con el UltraCombo. No recibí la excepción con el UltraComboEditor. ¿Ha Ud. tratado a asignar el propriedad "Text" en lugar de "SelectText" del UltraCombo? Como así:
Déjame saber si eso sirve para Ud.