LB-Reload index

From Vectorlab
Jump to: navigation, search


Procedure to load a List Browser's number column with row index starting by one. By Orso B. Schmid

{ Orso ********************************************* }
{ Load a number columns with row nr starting 1, refreshes the LB at the end }
PROCEDURE LB_ReloadIndx(d, LB: LONGINT; col: INTEGER);
	VAR
		i, totRows	: INTEGER;
		temp_b : BOOLEAN;

	BEGIN
		i := 0;
		totRows := GetNumLBItems(d, LB);
		WHILE i < totRows DO BEGIN
			i := i +1;
			temp_b := SetLBItemInfo(d, LB, i-1, col, Concat(i), -1);
		END;
		
		temp_b := RefreshLB(d, LB);
	END;