Page 1 of 1

Refresh a Browse With A New Pointer

Posted: Sat Jan 14, 2012 8:07 am
by GeneB
I am trying to change the Pointer variable outside of a DCBROWSE and then refresh the Browse to show the new Pointer position. The code below doesn't do it. Could someone please show me the proper way to do this? Thanks.

nItem := 1

@ 1,1 DCBROWSE oBrowse DATA aBrowse POINTER nItem
DCBROWSECOL ELEMENT 1 PARENT oBrowse HEADER "abc"

@ 10,10 DCPUSHBUTTON CAPTION "Search" SIZE 10,1 ;
ACTION {|| nItem := DoSearch(aBrowse) ;
, DC_GetRefresh(getlist) }

Re: Refresh a Browse With A New Pointer

Posted: Sat Jan 14, 2012 9:39 am
by rdonnay
Do this instead:

Code: Select all

nItem := DoSearch( aBrowse )

oBrowse:arrayElement := nItem
oBrowse:refreshAll()

Re: Refresh a Browse With A New Pointer

Posted: Sat Jan 14, 2012 1:15 pm
by GeneB
Perfect.
I hope you know how much your help is appreciated.
GeneB