Luego seleccionemos del botón de lista Object la Subrutina Grid Initialize
Y modifiquemos y agreguemos el siguiente código:
rem ' -----------------------------------------------------------------
rem ' Grid Initialize
rem ' -----------------------------------------------------------------
grid_init:
gml_qty%=1
call "gml::start"
rem ' copy this block for each grid set
gml_init.main_id%[1]=1001
gml_init.col_header_id%[1]=1002
gml_init.row_header_id%[1]=0
gml_init.sysgui%[1]=gb__sysgui
gml_init.context%[1]=fngb__context(gb__win_id$)
rem ' initialize gml
call "gml_i",gb__sysgui,gml_init$,gml$,gml_gm$[all],gml_gc$[all],gml_gr$[all],gml_set$
rem ' initialize gml template
gml.set%=1
call "gml::tpl_prep"
rem '--- Titulos de Columna ---
Gml_tpl.member% =2
Gml_tpl.col$[1] ="Codigo"
Gml_tpl.col$[2] ="Descripción"
Gml_tpl.col$[3] ="Cantidad"
Gml_tpl.col$[4] ="Costo Unitario"
Gml_tpl.col$[5] ="Total"
Gml_tpl.t_color$[1] =gml.blue$
Gml_tpl.t_color$[2] =gml.blue$
Gml_tpl.t_color$[3] =gml.blue$
Gml_tpl.t_color$[4] =gml.blue$
Gml_tpl.t_color$[5] =gml.red$
call "Gml::Update"
rem '--- Mascaras de Presentacion de Datos ---
call "Gml::tpl_prep"
Gml_tpl.Mask$[3]="##0.00"
Gml_tpl.Mask$[4]=m$
Gml_tpl.Mask$[5]=m$
call "Gml::set_out_mask"
rem '--- Alineamiento de los Datos ---
call "Gml::tpl_prep"
Gml_tpl.row_n%=-1
for i%=1 to 5
switch i%
case 1; rem Codigo
Gml_tpl.align%[i%]
=Gml.centered%
Gml_tpl.e_mode%[i%]
=true
break
case
2; rem Descripcion
Gml_tpl.align%[i%]
=Gml.left%
Gml_tpl.e_mode%[i%]
=true
break
case
3; rem Cantidad
case 4; rem Costo
case 5; rem Total
Gml_tpl.align%[i%]
=Gml.right%
Gml_tpl.e_mode%[i%]
=true
break
swend
next i%
call "Gml::put"
return
|