TSBrowse with one dimensional array
Posted: Wed Aug 01, 2007 7:38 pm
I have been working with TSBrowse ... and its very nice. However, I discovered a problem. If I browse a multi-dimensional array, no problem. However, when I browse a single dimensional array, it only displays the first letter of the column. Here is a sample that reproduces the problem. Is anyone working with TSBrowse, and do you have any thoughts on this ?
Tim
// Test TSBrowse with a single array element
#INCLUDE "fivewin.CH"
#INCLUDE "tsbrowse.CH"
PROCEDURE main
LOCAL aItm := { }
AADD( aItm, "This is text to test on line 1")
AADD( aItm, "This is text to test on line 2")
AADD( aItm, "This is text to test on line 3")
AADD( aItm, "This is text to test on line 4")
AADD( aItm, "This is text to test on line 5")
AADD( aItm, "This is text to test on line 6")
AADD( aItm, "This is text to test on line 7")
AADD( aItm, "This is text to test on line 8")
AADD( aItm, "This is text to test on line 9")
AADD( aItm, "This is text to test on line 10")
AADD( aItm, "This is text to test on line 11")
DEFINE DIALOG oDlg FROM 100,50 TO 400, 500 PIXEL Title "TSBrowse One Directional Array"
@ 0,0 BROWSE oLbx SIZE 600, 150 PIXEL OF oDlg
oLbx:setArray( aItm )
ADD COLUMN TO BROWSE oLbx DATA ARRAY ELEMENT 1 HEADER "Details" SIZE 400 ALIGN 0,1
oLbx:nLineStyle:=0
oLbx:nHeightCell += 4
oLbx:nHeightHead += 6
oLbx:lNoHScroll := .T.
// Activate the dialog screen
ACTIVATE DIALOG oDlg
RETURN NIL
Tim
// Test TSBrowse with a single array element
#INCLUDE "fivewin.CH"
#INCLUDE "tsbrowse.CH"
PROCEDURE main
LOCAL aItm := { }
AADD( aItm, "This is text to test on line 1")
AADD( aItm, "This is text to test on line 2")
AADD( aItm, "This is text to test on line 3")
AADD( aItm, "This is text to test on line 4")
AADD( aItm, "This is text to test on line 5")
AADD( aItm, "This is text to test on line 6")
AADD( aItm, "This is text to test on line 7")
AADD( aItm, "This is text to test on line 8")
AADD( aItm, "This is text to test on line 9")
AADD( aItm, "This is text to test on line 10")
AADD( aItm, "This is text to test on line 11")
DEFINE DIALOG oDlg FROM 100,50 TO 400, 500 PIXEL Title "TSBrowse One Directional Array"
@ 0,0 BROWSE oLbx SIZE 600, 150 PIXEL OF oDlg
oLbx:setArray( aItm )
ADD COLUMN TO BROWSE oLbx DATA ARRAY ELEMENT 1 HEADER "Details" SIZE 400 ALIGN 0,1
oLbx:nLineStyle:=0
oLbx:nHeightCell += 4
oLbx:nHeightHead += 6
oLbx:lNoHScroll := .T.
// Activate the dialog screen
ACTIVATE DIALOG oDlg
RETURN NIL