Ok .If a Font is assign to a headerFont we have to destroy it.
If we are to assign in a derived class, we add that destruction within the method destroy().
ok. Si asignamos una fuente al header o al footer , es responsabilidad nuestra destruirla.
Si pretendemos asignarla dentro de una clase derivada , tendremos que añadir esa destrucción dentro del metodo destroy()
- Code: Select all Expand view RUN
#include "fivewin.ch"
#include "xbrowse.ch"
function TestMain()
local oWnd
local oBrw
local oBar
local lEmpty := .f.
local oHeaderFont
local aArray := {}
SetResDebug( .t. )
DEFINE FONT oheaderFONT NAME "Arial" SIZE 0, -28
DEFINE WINDOW oWnd TITLE "Testing Autosave Data"
if empty( aArray )
aArray := {{"one","two","three","four"},;
{"one","two","three","four"},;
{"one","two","three","four"},;
{"one","two","three","four"}}
endif
@ 0,0 XBROWSE oBrw OF oWnd ;
COLUMNS {1,2,3,4} ;
HEADERS {"Activated-1","Activated-2","Deactivated-1","DeActivated-2"} ;
array aArray LINES CELL fastedit
oBrw:aCols[ 1 ]:lAutoSave := .t.
oBrw:aCols[ 2 ]:lAutoSave := .t.
oBrw:aCols[ 2 ]:oHeaderFont := oheaderFONT
aeval( oBrw:aCols, { |oCols| oCols:nEditType := EDIT_GET } )
oWnd:oClient := oBrw
oBrw:createfromcode()
activate window oWnd
oheaderFONT:end() // matar la fuente del header
checkres()
return nil