From: Alexander S.K. <al...@be...> - 2004-10-29 06:29:50
|
On 29.10.2004 0:24, Fernando Athayde <fer...@ya...> wrote: FA> if a browse with many data, function on V /\, not function with mouse dragging Does this mean that mouse dragging of a scroll thumb works in the same program if there is a small number of records in the database ? The implementation of a mouse dragging of a scroll thumb has some specific, because it is needed to determine the initial LOGICAL record number. There isn't any problems with arrays or with non indexed database, but if we have a database with a controlling index, we have to use function to determine a logical record number - OrdKeyNo(), etc. These functions may be quite slow in the case of a big database, so I prefer to not allow the mouse dragging in HBrowse as default. To switch ON the mouse dragging, you need to write: oBrw:bScrollPos := {|o,n,lEof,nPos|VScrollPos(o,n,lEof,nPos)} after definition of a BROWSE DATABASE ( see samples/a.prg, FileOpen() ); it is set by default in the case of BROWSE ARRAY. If you have a database with a controlling index, you need also to redefine the oBrw:bRecno : oBrw:bRecno := &( "{||" + oBrw:alias + "->(ORDKEYNO())}" ) Regards, Alexander http://kresin.belgorod.su |