Change of label width and height

Top  Previous  Next

Usually the labels are defined by the column count and row count property. But it is also possible to specify the width and height instead and the component will calculate the correct column and rowcount.

 

procedure TForm1.LabelWidthChange(Sender: TObject);

begin

 WPRichText1.RTFData.LabelDef.LabelWidth := LabelWidth.ValueAsInchOrCM(UseInch);

 WPRichText1.RTFData.LabelDef.LabelHeight := LabelHeight.ValueAsInchOrCM(UseInch);

 

 ColumnCount.SetValue( WPRichText1.RTFData.LabelDef.ColumnCount );

 RowCount.SetValue ( WPRichText1.RTFData.LabelDef.RowCount );

 

 StoreProps;

 WPRichText1.ReformatAll(true, true);

end;