0

In my project printing a negative value with format flag right to left. but it print a value like this "136-". What am do wrongly? How to print value like "-1233".

Am setting string format like this:

Dim mAmtFormat As New StringFormat(StringFormatFlags.DirectionRightToLeft) 

Using format in printdocument like this:

e.Graphics.DrawString("-123", mTextFont, Brushes.Black, mConsumMeas.xQtyX, mTop, mAmtFormat)

Sathish
  • 4,419
  • 4
  • 30
  • 59

1 Answers1

2

The right-to-left format is used for languages that are read from right to left. You want to use alignment to align the text to the right:

Dim mAmtFormat As New StringFormat()
mAmtFormat.Alignment = StringAlignment.Far
Guffa
  • 687,336
  • 108
  • 737
  • 1,005