Switching Colums in xBrowse ( problem fixed !!! )

Switching Colums in xBrowse ( problem fixed !!! )

Postby ukoenig » Sun Jan 27, 2008 8:55 pm

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 :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: nageswaragunupudi and 54 guests