(looking for a way to change the orientation of a label...)
...And I noticed this comment... if you set autosize and wordwrap to true and type with spaces, it doesnt actualy cause a word wrap!!
made by ADoozer
Now there is some truth to that...
And he got close to what my solution is by suggesting Hard-Coding the Labels in the code itself using vbcrlf...
However, I like to be able to change the labels on the Graphical Form Designer...
And there is a way to do this and use spaces with AutoSize and get the results you want without typeing a dozen " & vbcrlf & " between your letters...
Simply set the autosize to true,
Fill in the Caption property with something like "T E S T"
then insert this into the Form_Load sub... Label1.Caption = Replace(Label1.Caption, " ", vbCrLf)
Now if you are one of those people like me who hate excessive typing ;-)
You can make a sub such as: Sub VLabel(l as Label)
L.Caption = Replace(L.Caption, " ", vbCrLf)
End Sub
Then simply say...
VLabel Label1
VLabel Label2
VLabel Label3
or you could use the nice feature of being able to create control arrays...
make to Label arrays: lblHorz() for the horizontal labels lblVert() for the vertical labels
then you could simply put: For i = 0 to lblVert.Count - 1
VLabel lblVert(i)
Next
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.