Creating
a gambas2
program,
step by step, a telephone index
From : http://listingambas.blogspot.com/2011/06/definir-el-gridview-gridviewdatos.html
Define the
gridview: GridViewData
We will use gridviewData so that the user can view  data of the index. 
For this we must first define the number of
columns, width, font, etc.. 
The module will create a procedure called title.define with the
following code: 
 PUBLIC  SUB
define ()  
 
WITH
FMain. GridViewDatos
 . header 
= 
3
 . Row s
. COUNT
 =
 1
 . columns
. COUNT
 =
 16
 . Columns
[ 0
]. title
 =
 "Picture"
 . Columns
[ 1
]. title
 =
 "Name"
 . Columns
[ 2
]. title
 =
 "Surname" 
 . Columns
[ 3
]. title
 =
 "PC#"
 . Columns
[ 4
]. title
 =
 "Company"
 . Columns
[ 5
]. title
 =
 "Position"
 . Columns
[ 6
]. title
 =
 "Company Tel." 
 . Columns
[ 7
]. title
 =
 "Company Mobile" 
 . Columns
[ 8
]. title
 =
 "Private Tel." 
 . Columns
[ 9
]. title
 =
 "Private Mobile" 
 . Columns
[ 10
]. title
 =
 "Fax"
 . Columns
[ 11
]. title
 =
 "Mail"
 . Columns
[ 12
]. title
 =
 "Website"
 . Columns
[ 13
]. title
 =
 "Address"
 . Columns
[ 14
]. title
 =
 "Comments"
 . Columns
[ 15
]. title
 =
 "Date"
 . 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
And we add to form, in procedure
'Open', a call to this subroutine:
PUBLIC  SUB
Form_Open ()
ME.CENTER ()
var. reinit ()
title. define ()
END
Note: 
ME.CENTER-causes the form to be
displayed at the center of the screen.