How To Right Justify/Center Text in Single-Line Text Control (111952)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 4.0
- Microsoft Visual Basic Professional Edition for Windows 4.0
- Microsoft Visual Basic Enterprise Edition for Windows 4.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
This article was previously published under Q111952 SUMMARY
To center or right justify (align) the text in a text control that contains
a single line of text, set the multiline property to True and the Alignment
property to the desired value. Then trap the KeyPress event and use the
multiline and MaxLength properties to trap the carriage return and convert
it to another character.
Modification Type: | Minor | Last Reviewed: | 7/13/2004 |
---|
Keywords: | kbCtrl kbhowto KB111952 |
---|
|