TextBox line spacing tighter than 0"

M

mcwhirt3

Hello,

I have a textbox where the textsize changes variably based on the
amount of characters in the textbox. When the amount of characters get
to a certain number, the text wraps to a second line. However, when the
text wraps it is further than I would like it to be from the first
line, in terms of line spacing. I saw the line spacing property, and
unfortunately it doesn't allow me to enter a negative value. 0" is as
small as I can get but this renders a visible print distance between
lines rather than having them right next to each other as one would
think. Is there any way I can get the 2 lines of text in this textbox
to squeeze closer together? Thanks for any help.
 
S

Stephen Lebans

You would have to use the Print method of the Report object to render
the text yourself, line by line. Have a look at the code behind these 2
projects:

http://www.lebans.com/mixbold-plain.htm
and
http://www.lebans.com/baseline.htm

If the maximum number of lines you will be outputting is 2 then you
could quickly cobble to gether a solution. Just look at the bottom left
coordinate of the 1st TextBox(vertically), add this value to that of the
desired Line Spacing offset, and then set the CurrentY property of the
Report/Section object prior to calling the Print method to output the
second of your two lines.



--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Top