* Crear cursor.
create cursor cPersonal(codigo c(5), apellidos c(50), nombres c(50))
* Indexar.
index on codigo tag xcodigo
index on apellidos tag xapellidos
index on nombres tag xnombres
* Programaren los headers(Click)
*-----------------------------------------------------------------------------------
* column1.header1.click()
*
* Inicializar la propiedad Tag de cada header con la letra 'A'
*----------------------------------------------------------------------------------
select cPersonal
if This.Tag = 'A'
set order to xcodigo desc
This.Picture = 'imagen descendente' && Cualquier imagen referente.
This.Tag = 'D'
else
set order to xcodigo asc
This.Picture = 'imagen ascendente'
This.Tag = 'A'
endif
go top
This.Parent.Parent.Refresh()