Focus and TextAlign

Teaboy
09-20-2006, 06:49 AM
I've made a textbox that can be used to enter a money value, which all works perfectly, except for the fact that you can't tab out of it. This is because the textalign changes when you leave the textbox.

If I strip it down to the following, the problem is still there:


Protected Overrides Sub OnEnter(ByVal e As System.EventArgs)
MyBase.OnEnter(e)
TextAlign = HorizontalAlignment.Left
End Sub
Protected Overrides Sub OnLeave(ByVal e As System.EventArgs)
MyBase.OnLeave(e)
TextAlign = HorizontalAlignment.Right
End Sub


Any suggestions?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum