0

I wants to know got any way to display a text inside the textbox together with align left and right. The textbox property just only left or right. Example:

enter image description here

3
  • Use a fixed width (non-proportional) font and right pad the first value with spaces to a fixed length. Commented Feb 10, 2014 at 6:40
  • why don't you just use 2 textboxes. or is it part of your requirement to only use 1? Commented Feb 10, 2014 at 9:12
  • Any idea how to fixed the length? Because i will have the scroll bar,the filename and the date should be in the same line. Commented Feb 10, 2014 at 14:47

2 Answers 2

1

I have been trying to align amount with 3 decimal places in the right of a text box. The string variable I use is addnreport.

I used a temporary string StrX which I RSet (Right Pad) In atext editor, it shows up as expected but in the Text Box, the values on the extreme right seem to be centre aligned no matter what you do.

addnreport = addnreport & acc & vbTab & month & vbTab & "PL" 
            RSet StrX = (Format(Round(amount, 3), "#,###,###,##0.000"))
            addnreport = addnreport & StrX & vbCrLf
Sign up to request clarification or add additional context in comments.

Comments

0

You can try add tab char for this,

  • set default textbox alignment to left,
  • in code behind add first word
  • in code behind add tab char
  • in code behind add second word
  • display it in your textbox

hope it work

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.