I have had trouble trying to refresh BROWSEs. I can get the additional data painted OK on the screen but the navigation doesn't work correctly. I have reproduced the problem in this sample (modified from testbrow.prg)
Code: Select all
#include "FiveLinux.ch"
function Main()
PUBLIC aFIRST
PUBLIC aSECOND
PUBLIC oBrw
PUBLIC oWnd
aFIRST := { 1, 2 }
aSECOND := { "one", "two" }
DEFINE WINDOW oWnd TITLE "Testing Browses" SIZE 522, 317
@ 2, 2 BROWSE oBrw OF oWnd ;
HEADERS "First", "Second" ;
FIELDS aFIRST[oBrw:nAt], aSECOND[oBrw:nAt] ;
UPDATE
oBrw:SetArray( aFIRST )
@ 28, 2 BUTTON "_Add" OF oWnd ACTION AddToBrowse()
@ 28, 12 BUTTON "_Ok" OF oWnd ACTION oWnd:End()
ACTIVATE WINDOW oWnd
return nil
FUNCTION AddToBrowse()
AAdd( aFIRST, 3 )
AAdd( aFIRST, 4 )
AAdd( aFIRST, 5 )
AAdd( aSECOND, "three" )
AAdd( aSECOND, "four" )
AAdd( aSECOND, "five" )
oBrw:SetArray( aFIRST )
oWnd:Refresh()
RETURN nil
Maybe I am doing something wrong or failing to do something I should be doing. Please advise.
Thanks
Doug
(xProgrammer)