<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Apollo VCL Component Reference > TApolloTable > TApolloTable Methods > OrderPosSet |
Declaration
procedure OrderPosSet( dPosition: Double );
Description
Sets the relative position of the current index key within the active order based on a fractional percentage value.
Parameters
dPosition: Is a floating-point value between zero (0) and one (1) inclusive. For example, to set the current key position to 25% of the way through the index, set dPosition to 0.25. If no index order is active (natural order) this method has no effect.
Delphi Example
// Go to record at specified percentage
if (ApTbl.IndexName = '') then
ApTbl.Go( ScrollBar1.Position * Trunc( ApTbl.Count/100 ))
else
ApTbl.OrderPosSet( ScrollBar1.Position / 100 );
C++Builder Example
// Go to record at specified percentage
if (ApTbl->IndexName == "")
ApTbl->Go( ScrollBar1->Position * Trunc( ApTbl->Count() / 100 ))
else
ApTbl->OrderPosSet( ScrollBar1->Position / 100 );
See Also