Ver Mensaje Individual
  #28 (permalink)  
Antiguo 10/04/2012, 10:40
Avatar de Aquaventus
Aquaventus
 
Fecha de Ingreso: junio-2010
Ubicación: Lima-Peru , En el alba de la naturaleza
Mensajes: 2.105
Antigüedad: 13 años, 10 meses
Puntos: 267
Respuesta: Botones Dinamicos

No te voy a dar la solución pero te doy algo similar, espero que con esto sí entiendas... Por que es algo que ya lo tienes hecho en tu propio codigo pero no entiendo xq no lo entiendes...:
haces tu consulta a tu bd para traer los valores
Código vb:
Ver original
  1. Dim tabla As OdbcDataReader
  2.             Dim conex As New Conexion
  3.             tabla = conex.consultar("select boton1,boton2,boton3,boton4,boton5,boton6,boton7,boton8,boton9  from botones")
  4.  
  5. While tabla.Read
  6.  
  7.  For i = 1 To totalLogros
  8.            
  9. ReDim BotonEquipo1(totalPartidos, i)
  10.                 BotonEquipo1(totalPartidos, i) = New Button
  11.                 BotonEquipo1(totalPartidos, i).Text = tabla.GetValue(i - 1)
  12.                 BotonEquipo1(totalPartidos, i).Size = New Size(33, 20)
  13.                 BotonEquipo1(totalPartidos, i).Location = New Point(x, 20)
  14.                 Partidos(totalPartidos).Controls.Add(BotonEquipo1(totalPartidos, i))
  15.      
  16.                 ReDim BotonEquipo2(totalPartidos, i)
  17.                 BotonEquipo2(totalPartidos, i) = New Button
  18.                 BotonEquipo2(totalPartidos, i).Text = tabla.GetValue(i - 1)
  19.                 BotonEquipo2(totalPartidos, i).Size = New Size(33, 20)
  20.                 BotonEquipo2(totalPartidos, i).Location = New Point(x, 55)
  21.                 Partidos(totalPartidos).Controls.Add(BotonEquipo2(totalPartidos, i))
  22.      
  23.                 x = x + separacion
  24.      
  25.             Next
  26.  
  27. End While
__________________
Internet es tener todo el conocimiento global a tu disposición.
Desarrollo de Software - Ejemplos .Net

Última edición por Aquaventus; 10/04/2012 a las 11:27 Razón: error