Arraybrowser

This forum is for eXpress++ general support.
Post Reply
Message
Author
c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Arraybrowser

#1 Post by c-tec »

Hello,
I stuck on little problem with codeblocks for array browsing. I have an array browser where I want to mark lines. But when I change the check value of one line, in the browser all elements are displayed as marked or unmarked. When checking the array the values are ok, only the browser displays the wrong values. Have also tried to put the codeblock in a separate function, the same result.

Code: Select all

@ 2,0 dcbrowse oBrowse size 100,30 data aFields POINTER nPointer ...
DCBROWSECOL DATA {||iif(aFields[nPointer,1],"ok","  ")} WIDTH 1  PARENT oBrowse  HEADER "Sel" 
...
@ 33,_col() DCPUSHBUTTON CAPTION "F3=Mark"        SIZE 15,1.5 ACTION {||aFields[nPointer,1] := !aFields[nPointer,1],dc_getrefresh(oBrowse)}  
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: Arraybrowser

#2 Post by rdonnay »

nPointer doesn't change when each browse row is painted.

You need to use DC_GetColArray() or oBrowse:arrayElement.

Code: Select all

@ 2,0 dcbrowse oBrowse size 100,30 data aFields POINTER nPointer ...
DCBROWSECOL DATA {||iif(aFields[oBrowse:arrayElement,1],"ok","  ")} WIDTH 1  PARENT oBrowse  HEADER "Sel"
The eXpress train is coming - and it has more cars.

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Arraybrowser

#3 Post by c-tec »

Hello Roger,
thank you, works now
regards
Rudolf
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

Post Reply