Hello from Germany
I had a small problem to switch columns in xBrowse
SAMPLES :
// Old
for nFor := 1 to Fcount()
oBrw5:aCols[ nFor ]:bRClickHeader := {|r,c,f,o| cFELD := :cHeader, ;
SET_INDEX(oBrw5,cFELD), ;
IIF(DBFTYP = "CDX", ;
cINDKEY := ORDKEY( "NEUINDEX" ), ;
cINDKEY := INDEXKEY( 0 ) ), ;
oBrw5:Refresh(), ;
oBrw5:SwapCols( 1, oBrw5:nAt() ), ;
oBrw5:nFreeze := 1 }
next
// fixed NEW !!
// --------------
for nFor := 1 to Fcount()
oBrw5:aCols[ nFor ]:bRClickHeader := {|r,c,f,o| cFELD := ;
o:cHeader, ; // = oCol:cHeader
nOrder := o:nCreationOrder, ; // = Number of Clicked-Col
SET_INDEX(oBrw5,cFELD), ;
IIF(DBFTYP = "CDX", ;
cINDKEY := ORDKEY( "NEUINDEX" ), ;
cINDKEY := INDEXKEY( 0 ) ), ;
oBrw5:Refresh(), ;
oBrw5:SwapCols( 1, nOrder ), ; // Bring selected Col to 1
oBrw5:GoLeftMost(), ; // Go to 1. Col ( indexed )
oBrw5:nFreeze := 1 } // Freeze 1. Col
next
( SET_INDEX() is a function, which detects the used RDD from the
header of the selected database than
the selected col sets the index. )
1. With a right click on the header, I set the index for the column.
Now the Text in the header is red.
2. I switch the col-pos for the selected col to 1
set the focus to the 1. Col and freeze the 1. Column.
U. König