P
Peter Wetschnigg
Hello,
on a report's groupheader i have a textbox which i would like to be framed
by a rectangle depending on the width of the text it contains. I now use
the TextWidth function within the following code:
Private Sub Gruppenkopf0_Print(Cancel As Integer, PrintCount As Integer)
Breite = Me.TextWidth(Me.Text20)
Me.Line (Text20.Left, Text20.Top)-((Text20.Left + Breite), (Text20.Top
+ Text20.Height)), , B
End Sub
But the TextWidth function doesn't seem to calculate the width of the text
in the textbox properly, it is too small. If I multiply the result (Breite)
by 1.6 I get a good, but still not exact result in most cases. Am I missing
something?
Best regards,
P. W.
on a report's groupheader i have a textbox which i would like to be framed
by a rectangle depending on the width of the text it contains. I now use
the TextWidth function within the following code:
Private Sub Gruppenkopf0_Print(Cancel As Integer, PrintCount As Integer)
Breite = Me.TextWidth(Me.Text20)
Me.Line (Text20.Left, Text20.Top)-((Text20.Left + Breite), (Text20.Top
+ Text20.Height)), , B
End Sub
But the TextWidth function doesn't seem to calculate the width of the text
in the textbox properly, it is too small. If I multiply the result (Breite)
by 1.6 I get a good, but still not exact result in most cases. Am I missing
something?
Best regards,
P. W.