如何在rdlc文本框中的行之间设置空格? [英] How to set space between lines in a rdlc textbox?
问题描述
如何在rdlc文本框中设置行间距?
场景:应用程序应将报告打印到预先打印的固定页。报告的一个字符串字段通常包含大约400个字符的数据(用户输入的描述),它应以多行打印。
作为解决无法设置LineHeight属性的问题在rdlc中的文本框控件中,我编写了一个自定义代码,它将新的行字符插入到字符串中(通过添加Environment.NewLine),使字符串被分成多行。
但是,我是无法在文本框中的每一行之间设置空格。我尝试过设置SpaceAfter和SpaceBefore属性。没有变化:-(
我也尝试过使用VbCrLf和Chr(10)和Chr(13)的组合而不是Environment.NewLine。没有帮助......你能帮忙!!!
我正在使用VS2010 Premium Edition和Application Framework of 4.0 framework。
How can we set the space between lines in an rdlc textbox?
Scenario: The application shall be printing a report to a pre-printed stationary sheet. One string field of the report is usually having about 400 characters of data (description input by user), which shall be printed in multiple lines.
As a workaround to the problem of not able to set LineHeight property of textbox control in rdlc, I have written a custom code which will insert new line characters into the string (by adding Environment.NewLine) such that the string is splitted into multiple lines.
However, I am not able to set the space between each line in the text box. I have tried setting both SpaceAfter and SpaceBefore property. No change :-(
I also tried using VbCrLf and combination of Chr(10) and Chr(13) instead of Environment.NewLine. Did not help... Can you help!!!
I am using VS2010 Premium Edition and Application Target of 4.0 framework.
推荐答案
设置文本框中每行之间的间距。右键单击文本框并选择属性,然后选择字体部分。在行间距区域中选择自定义并放置9pt,数字越大,您的间距就越大。
To set spacing between each line in the textbox. Right click the textbox and select properties, then the Font section. In the Line Spacing area select custom and put a 9pt, the higher the number, the more spacing you will have.
这篇关于如何在rdlc文本框中的行之间设置空格?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!