Ver Mensaje Individual
  #1 (permalink)  
Antiguo 01/10/2012, 10:03
3ricks0ul
 
Fecha de Ingreso: junio-2012
Mensajes: 90
Antigüedad: 12 años, 9 meses
Puntos: 2
Problemas con controles Krypton

Saludos colegas, vera, quiero realizar una función donde pueda hacer la limpieza de todos los controles texbox y combobox de mi form, hasta ahora tengo esto...

Código VB.NET:
Ver original
  1. For Each t As ComponentFactory.Krypton.Toolkit.KryptonTextBox In Controls
  2.             If TypeOf t Is ComponentFactory.Krypton.Toolkit.KryptonTextBox Then
  3.                 t.Text = ""
  4.             End If
  5.         Next
  6.  
  7.         For Each c As ComponentFactory.Krypton.Toolkit.KryptonComboBox In Controls
  8.             If TypeOf c Is ComponentFactory.Krypton.Toolkit.KryptonComboBox Then
  9.                 c.SelectedIndex = -1
  10.             End If
  11.         Next


Pero me truena el programa al llamar a las funciones, me sale el siguiente error:

Unable to cast object of type 'ComponentFactory.Krypton.Toolkit.KryptonPanel' to type 'ComponentFactory.Krypton.Toolkit.KryptonTextBox'.

Sugerencias? :(