Antonio,
When the highlite reachs the last line of the browse if you go over it always returns the numer of the last row.
If we have 25 rows it always return 25.
I don't see how it can works.
Antonio
Antonio H Ferreira
Antonio,
When the highlite reachs the last line of the browse if you go over it always returns the numer of the last row.
If we have 25 rows it always return 25.
I don't see how it can works.
Antonio
AHF,
Here is a skipblock that doesn't use a database object:
oBrw:bSkip:={| nRecs | (nRecs:= (cAlias)->(_dbskipper( nRecs )), lClrFlag:=if(nRecs/2 = int(nRecs/2), lClrFlag,!lClrFlag), nRecs) }
James
Here is a suggestion. I didn't put this in my example, but I would remove the lines.
oBrw:nLineStyle:=0
You don't need lines when you have colored rows, and it looks better without the lines.
James
James,
A reminder ... with ADS, using tSBrowse ( and I would assume others ), nRecs is returned as an unknown type of data element when there are no records to browse. Thus, using the ordKeyNo() ( or ADSKeyNo() ) method described by Antonio will work without a problem.
Of course, I am using data objects ... love them ... wouldn't be without them.
Tim
Antonio,
This one does not need to manage the DBF or the browse row. Just requires a logical variable:
oLbx:nClrPane := { || lClr := ! lClr, If( lClr, rgb(...), rgb(...) ) }
I haven't tested it, but it seems it could work
Antonio,
Its a Tcbrowse. nClrPane is evaluate on each column painting.
It doesn't work.
Antonio
You are right...
I've tried this code it works except when there are rows above first visible row.
mbrowse:nClrPane := { | nRowPos, nJ| if(nj=mbrowse:ncolpos,lClr := ! lClr,lClr),;
If( lClr, mbrowse:ncor1, mbrowse:ncor2 ) }
Any ideas ?
Antonio
Tim,
>A reminder ... with ADS, using tSBrowse ( and I would assume others ), nRecs is returned as an unknown type of data element when there are no records to browse.
I'm sure we could write a routine to trap unknown data types.
>Thus, using the ordKeyNo() ( or ADSKeyNo() ) method described by Antonio will work without a problem.
AHF says that using ordKeyNo() makes it very slow, thus I was showing another way without using ordKeyNo(). He did not state which RDD he was using.
James
AHF,
Did you try my skipblock for non-object databases as shown above?
What RDD are you using?
James
With this function I have no speed issue. In fact, your modifications of tSBrowse make it FLY with the mousewheel ...
I'm using RMDBCDX wich works ok except in what concernes networking with the use of ordkeyno or ordkeycount.
It seems that this RDD has no caching as Clipper did thus the applications using these functions extensively within a network will see a speed degradation to a point were you can't work anymore.
I'm in the process of using ADS but I have some problems with the convertion process, so for now I must use other alternative RDD.
I'm trying James skipblock but it seems it will not work. My former nClrPane block it works only skipping down the table I 'm figuring out why. Since it is a Tcbrowse object and the nClrPane is evaluated painting each column the block can only be evaluate once for each line otherwise you'll get a chess browse.
Antonio
None of the above solutions is working.
Any ideas?
Antonio
oBrw:nClrPane := { |nRow| iif( nRow % 2 == 0, rgb(255,255,235), rgb(192,208,179)) }Line 44: Instead of blank line :
DATA nRowScrol AS NUMERIC INIT 0
//
In method paint()
Line 253: In the present blank line:
::nRowScrol := 0
//
In method drawline, at line number 415
Instead of old code:
nClrBack := Eval( nClrBack, If( xRow == nil, nRowPos, xRow ) , nJ )
Substitute the new code:
nClrBack := Eval( nClrBack, If( xRow == nil, nRowPos, xRow ) + ::nRowScrol , nJ )
//
Method GoDown(): Substitute Old Line 1086
Instead of :
::lRepaint := .f.
Substitute :
::lRePaint := .f. ; ::nRowScrol := iif( ::nRowScrol == 0, 1, 0 )
//
Method GoUp() : Substitute old line 1128
Instead of :
::lRepaint := .f.
Substitute :
::lRePaint := .f. ; ::nRowScrol := iif( ::nRowScrol == 0, 1, 0 )oBrw:nClrPane := { |nRow| iif( nRow % 2 == 0, rgb(255,255,235), rgb(192,208,179)) }