Determining Width of Text for TfrxMemoView
I'm creating TfrxMemoView components in the header band of a report and am having difficulty figuring out how to determine the necessary width of the component based on the text value that will be assigned. I've tried setting the value of a TfrxLabel and measuring the TextWidth of the Canvas, but that doesn't seem to match up. For example
TestLabel.TextSettings.Font.Family := 'Arial';
TestLabel.TextSettings.Font.Size := 10;
TestLabel.TextSettings.Font.Style := [TFontStyle.fsBold];
Width := TestLabel.Canvas.TextWidth('Replacement');
results in a value of about 68 pixels (.70 inches). But when I add the text to the TfrxMemoView component directly, it requires about 1 inch to display without truncating the text.
How can I determine the necessary width needed for the TfrxMemoView component for a text value?