domingo, 26 de junio de 2011

Definir el gridview: GridViewDatos

En el gridviewDatos, vamos a utilizarlo para que el usuario vea los datos del listin. Para esto primero tenemos que definir el numero de columnas,anchura, tipo de letra, etc.
En el módulo titulo crearemos un procedimiento llamado definir con el siguiente código:
PUBLIC SUB definir()
WITH FMain.GridViewDatos
.header = 3
.Rows.COUNT = 1
.columns.COUNT = 16
.Columns[0].title = "Imagen"
.Columns[1].title = "Nombre"
.Columns[2].title = "Apellidos"
.Columns[3].title = "DNI"
.Columns[4].title = "Empresa"
.Columns[5].title = "Puesto de Trabajo"
.Columns[6].title = "Telf. Empresa"
.Columns[7].title = "Movil Empresa"
.Columns[8].title = "Telf. Particular"
.Columns[9].title = "Movil Particular"
.Columns[10].title = "Fax"
.Columns[11].title = "Correo"
.Columns[12].title = "Pagina Web"
.Columns[13].title = "Dirección"
.Columns[14].title = "Observaciones"
.Columns[15].title = "Fecha"
.Columns[0].width = 74
.Columns[1].width = 80
.Columns[2].width = 131
.Columns[3].width = 80
.Columns[4].width = 80
.Columns[5].width = 113
.Columns[6].width = 87
.Columns[7].width = 95
.Columns[8].width = 90
.Columns[9].width = 98
.Columns[10].width = 80
.Columns[11].width = 80
.Columns[12].width = 80
.Columns[13].width = 80
.Columns[14].width = 165
.Columns[15].width = 81
.font.name = "Sans"
.font.size = 9
.Background = 16777215
.Foreground = 0
END WITH
END



Y añadimos en el procedimiento Open del formulario la llamada a esta subrutina:






PUBLIC SUB Form_Open()
ME.CENTER()
var.reinicio()
titulo.definir()
END
Nota:
ME.CENTER: provoca que el formulario se centre en la pantalla.

No hay comentarios:

Publicar un comentario