JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Aligning Text in Text Boxes

The Aesthetic Design Department has sent you a memo. Your new program meets its requirements for design standards, except for one thing: All the text boxes in your program are stacked on top of one another, and the Aesthetic Design Department thinks it would be terrific if you display the text in those boxes as centered, not left-justified.

Well, you seem to remember that text boxes have an TextAlign property, so you set it to Centered (there are three possibilities: 0: left-justified, 1: right-justified, and 2: centered) at design time in all the text boxes. You can see the result in Figure 5.4.


Figure 5.4: Aligning text in a text box.
Tip 

In VB6 and before, you needed to set a text box's MultiLine property to True before text alignment would work, but that's no longer true.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor