Search code examples
.netdevexpresstextedit

How to Show Negative Values to RightSide of Devexpress TextEdit


Actually,I need to Show only Numbers on TextEdit and It can be both Negative and Positive. When I want that text to be Displayed to the Right.

So the Properties of my TextEdit are :

MaskType : Numeric
RightToLeft : Yes

Now,My Problem is,It is Showing Text in the Format like :

For Positive Values -> 888
For Negative Values -> 888-

I want that Minus(-) symbol to be displayed to be displayed before the number(888).

  • For Example -> -888

Can Anyone Help me?


Solution

  • You can use:

    TextEdit.Properties.Appearance.TextOptions.HAlignment

    If you wish to change text alignment to right, set HAlignment to HorzAlignment.Far instead of RightToLeft: Yes

    I believe it will produce the desired result.