Hello,
Is oLbx:Upstable() still required for FWH 8.01? It seems the REDEFINE LISTBOX is not refreshing properly with oLbx:Upstable, oLbx:Refresh().
Thank You,
#INCLUDE "xbrowse.CH"
local a:= { {"1"}, {"2"}, {"3"}}
local oWnd, oBrw
define window oWnd
@0,0 xbrowse oBrw array a autocols of oWnd
oBrw:createFromCode()
// Muestra solamente 2 registros y se coloca en el registro correcto
activate window oWnd on init ( eval( oBrw:bBookMark, 2 ), oBrw:refresh() )
// Muestra todos los registros pero se coloca en el primero
activate window oWnd on init ( eval( oBrw:bBookMark, 2 ), oBrw:refresh(.t.) )
// Muestra todos los registros y se coloca en el correcto
activate window oWnd on init ( eval( oBrw:bBookMark, 2 ), oBrw:upstable(), oBrw:refresh() )
#include "fivewin.ch"
#include "xbrowse.ch"
request DBFCDX
function main()
field NCOL, CCOL
local n, oWnd, oBrw
DbCreate( 'xtest', { { 'NCOL', 'N', 3, 0 }, { 'CCOL', 'C', 3, 0 } } )
USE XTEST VIA "DBFCDX"
for n = 1 to 5
DbAppend()
FieldPut( 1, n )
FieldPut( 2, Replicate( Chr( 70 - n ), 3 ) )
next n
INDEX ON NCOL TAG NCOL
INDEX ON CCOL TAG CCOL
USE
USE XTEST VIA "DBFCDX"
SET ORDER TO TAG NCOL
GO TOP
DEFINE WINDOW oWnd
@ 0,0 XBROWSE oBrw OF oWnd ALIAS 'XTEST' AUTOCOLS AUTOSORT
oBrw:CreateFromCode()
oWnd:oClient := oBrw
ACTIVATE WINDOW oWnd
return nil
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 76 guests