Resumen MSFlexGrid

Hace tiempo se enviaron unas rutinas que hizo MS...
Se las envío nuevamente...
--------------
No faltaba más...
Te explico mi travesía....

1) Microsoft tiene un código ya hecho para eso.. Ellos tienen un textbox el
cual ocultan y hacen que aparesca por arriba de cualquier celda... Esto es
bueno si quieres utilizar mucho código.... Pero hace el trabajo... También
puedes modificarlo e utilizar otros controles (no solo textbox) como Combo,
Calendario para que aparescan sobre cualquier celda....
 <>
2) En cambio tengo otro código que es mucho mejor... Si lo que buscas es
introducir texto...

Funciona con 2 procedimientos generales:(ESTOY VALIDaNDO QUE SOLO SEAN
NUMEROS)
(Por cierto la palabra tabla debe ser GRID -- Un pelon ;) )

----------------------------------------------------------------------------
---------------------------
Private Sub Borrar(Tabla As msflexgrid, KeyCode As Integer)
Tabla.Col = 1
Tabla.Row = Tabla.Row
If KeyCode = vbKeyDelete Then
   Tabla.Text = ""
ElseIf (KeyCode = vbKeyDown) Or (KeyCode = vbKeyUp) Or (KeyCode =
vbKeyReturn) Then
       Tabla.Text = Format(Tabla.Text, "##,###,###0.00")
ElseIf KeyCode = vbKeyBack Then
    If Tabla.Text <> "" Then
       Tabla.Text = Left(Tabla.Text, Len(Tabla.Text) - 1)
    End If
End If
End Sub

Private Sub Escribir(Tabla As msflexGrid, KeyAscii As Integer)
If ((KeyAscii >= 48) And (KeyAscii <= 57)) Or (KeyAscii = 44) Or (KeyAscii =
46) Then
   Tabla.Text = Trim(Tabla.Text + Chr(KeyAscii))
End If
End Sub
----------------------------------------------------------------------------
---------------------------


y dos eventos sobre el MSFLEXGRID
----------------------------------------------------------------------------
---------------------------
Private Sub GRID_KeyDown(KeyCode As Integer, Shift As Integer)
    Call Borrar(Deduccion, KeyCode)
End Sub

Private Sub GRID_KeyPress(KeyAscii As Integer)
    Call Escribir(Asignacion, KeyAscii)
End Sub
----------------------------------------------------------------------------
---------------------------
    Espero que esto te sirva de algo..



Slds
Gustavo López

> -----Original Message-----
> From:    Horacio Lopez [SMTP:hlopez@invap.com.ar]
> Sent:    Thursday, September 23, 1999 10:55 AM
> To:    Lista VB-ESP
> Subject:    Re: vb-esp : MSFlexGrid
>
> Hola amigos
> Como se pueden editar los datos de una tabla en un flexgrid? Sólo consigo
> mostrarlos, no editarlos
> Gracias desde ya
> Ivan
> No se puede debes hacer tus rutinas.
> Saludos.

Download flexgrid.zip  



Resumen Resumen

Visual Basic Página de Visual Basic

Página principal Página principal

www.jrubi.com