Jack Developer

Hi, I've been looking for this issue:

I'm trying to align CtlText to right in the AxMaskedBox, but there's no properties that make that effect.

I tried the CtlText.PadLeft, but it is not working, May somebody help me Thank You!



Re: Visual Basic General Need Help

Rick

if AxMaskedBox is a MaskedTextBox then there is a property:

AxMaskedBox.TextAlign = HorizontalAlignment.Right





Re: Visual Basic General Need Help

Jack Developer

Hey Thank you, i'm gonna try it, your solution sounds so obvious, ha ha, I don't know why I didnĄŻt think about it before





Re: Visual Basic General Need Help

Jack Developer

Hi ! I tried what you said, but the AxMaskedBox doesnĄŻt have the propertie, but the Format propertie aceppts HorizontalAlignment.Right Value, the point is, it didn't work,,, Thank you anyway ! I'll keep on searching for





Re: Visual Basic General Need Help

arbytech

Hi,

You could use this in a MaskedTextBox1_GotFocus sub.

MaskedTextBox1.TextAlign = HorizontalAlignment.Right

arbytech





Re: Visual Basic General Need Help

Jack Developer

The problem is, I'm not using a MaskedTexBox, it is an AxMaskedBox, similar to the first, but the second doesn't has the TextAlign propertie, thank you anyway,