Resumen Editar en un MsFlexGrid

Hola ....

Espero que te refieras al MsFlexiGrid, que no es editable , por que sino
..... :-)

Pues para resumir los que esta mas abajo, el ejemplo lo que hace colocar
un TextBox sobre una casilla del Flexigrid y poner el texto, es un
ejemplo que viene con el Developer Network, asi que no hay mucho merito.

Todo esta en una Funcion GridEdit y en el manejo de algunos eventos.
Espero que te sirva

------------------ CORTAR -------------
Sub GridEdit(KeyAscii As Integer)
   'use correct font
   Text1.FontName = MSFlexGrid1.FontName
   Text1.FontSize = MSFlexGrid1.FontSize
   Select Case KeyAscii
      Case 0 To Asc(" ")
         Text1 = MSFlexGrid1
         Text1.SelStart = 1000
      Case Else
         Text1 = Chr(KeyAscii)
         Text1.SelStart = 1
   End Select

   'position the edit box
   Text1.Left = MSFlexGrid1.CellLeft + MSFlexGrid1.Left
   Text1.Top = MSFlexGrid1.CellTop + MSFlexGrid1.Top
   Text1.Width = MSFlexGrid1.CellWidth
   Text1.Height = MSFlexGrid1.CellHeight
   Text1.Visible = True
   Text1.SetFocus
End Sub

Private Sub MSFlexGrid1_DblClick()

  GridEdit Asc(" ")

End Sub
Private Sub MSFlexGrid1_GotFocus()
  If Text1.Visible Then
      MSFlexGrid1 = Text1
      Text1.Visible = False
   End If
End Sub
Private Sub MSFlexGrid1_KeyPress(KeyAscii As Integer)

   GridEdit KeyAscii

End Sub

Private Sub MSFlexGrid1_LeaveCell()
   If Text1.Visible Then
      MSFlexGrid1 = Text1
      Text1.Visible = False
   End If
End Sub
-------------------------- CORTAR -------

Saludos

.Laki.

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com



Resumen Resumen

Visual Basic Página de Visual Basic

Página principal Página principal

www.jrubi.com