LB-Number to Char

From Vectorlab
Jump to: navigation, search


Procedure to convert numbers to letters in a chosen LB column, good for drag and drop columns. By Orso B. Schmid

{ Orso ********************************************* }
{ converts numbers to letters, good for drag and drop columns }
PROCEDURE LB_ResortAlpha(d, LB: LONGINT; col: INTEGER);
	VAR
		colCnt : INTEGER;
		i  : INTEGER;
		temp_b : BOOLEAN;
	BEGIN
		colCnt := GetNumLBItems(d, LB);
		FOR i := 0 TO colCnt-1 DO
			temp_b 	:= SetLBItemInfo(d, LB, i, col, chr(65 + i), -1);
			
		temp_b 	:= RefreshLB(d, LB);
	END;