LB-Avoid column with zero-width

From Vectorlab
Jump to: navigation, search


Procedure to avoid creating a column with width=zero (needed for VW13: col zero crashes the application). By Orso B. Schmid

{ Orso ********************************************* }
{ avoid column width 0: crashes VW 13 < 87105 }
PROCEDURE LB_AvoidColZero(d, LB: LONGINT; col: INTEGER; defaultWidth: INTEGER);
	VAR
		w : INTEGER;
		temp_b : BOOLEAN;
		
	BEGIN
		IF GetLBColumnWidth(d, LB, col, w)  & ( w <= 0) THEN
			temp_b := SetLBColumnWidth(d, LB, col, col, defaultWidth); 
	END;