TextBox5.TextAlign = HorizontalAlignment.Right TextBox4.TextAlign = HorizontalAlignment.Center TextBox3.TextAlign = HorizontalAlignment.Right TextBox2.TextAlign = HorizontalAlignment.Center TextBox1.TextAlign = HorizontalAlignment.Right I'm just showing it here so you know what to do 'All of the below stuff you could set in the textboxes properties. Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load And yeah, it does require some effort to do. Then I set the TextBoxes to do their stuff. The real issue, which I didn't do, is size the TextBoxes so they just contain the amount of space necessary for the characters they will hold in order to tighten up the spacing. Then change the Panel size to match the length of all the TextBoxes end to end and the height of the TextBoxes. I place the seven TextBoxes within the Panel, one after the other, Then I use seven TextBoxes with white backgrounds and no borders (4 for digits, 3 for the period between digit sets). In my solution I use a Panel with a white background. Unfortunately my method is alot more complex but provides a much nicer solution. Actually the MaskedTextBox does a poor job of performing this task for you because it displays nothing like what you want.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |