Re: Display the whole caption into a Label
Well... looks like using the default font and your size label it holds 39 characters if those characters are all X or other character of that size on one line. Word wrap only works when there is a space so that does nothing for a continuous string of characters.
If I turn on word wrap and use a string which has a bunch of Xs with a space every 10 characters I can get 80 characters in that space with room to spare.
So it would seem that if you are using word wrap and an 8 pt font that your string must not have any spaces you could make this string wrap by adding a VBCRLF into the string at the point where you need it to wrap or by turning on word wrap and inserting a space where it needs to be wrapped.
Try this... place a label named label1 on the form with the size you specified, leave the font at the default and turn on word wrap. Place a command button on the form with the default name of command 1 then add this code and try it
Code:
Private Sub Command1_Click()
Label1.Caption = ""
Dim x As Integer
For x = 1 To 79
If x Mod 10 = 0 Then
Label1.Caption = Label1.Caption & " "
Else
Label1.Caption = Label1.Caption & "X"
End If
Next
Label1.Caption = Label1.Caption & "W"
End Sub
Always use [code][/code] tags when posting code.