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 sent a link in order that they see the mistake that it generates when I execute the project with the event UltraCombo1_KeyDown. Please can they give me a solution?
http://youtu.be/B7DJjVzmM7M
Alejandro,
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.
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
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
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?
¿Sirve eso para Ud.?