TextBox alignment

  • Thread starter Thread starter Boni
  • Start date Start date
B

Boni

Dear all,
on my form I have 2 textboxes:
Name
FilePath


Near the textbox FilePath there is a browse button and textbox itself is
readonly.
So first user presses Browse and selects path, then he types filename and
when he is typing, the FileName.text is automatically typed into FilePath
after the path.
Problem: If path is too long the FileName.text is not in the visible area of
FilePath. I need the textbox to be rightaligned. But the alignment property
don't help, it seems to only work if the text changed directly by user.
Is thare a way to solve this?
Thanks,
Boni
 
Boni said:
on my form I have 2 textboxes:
Name
FilePath


Near the textbox FilePath there is a browse button and textbox itself is
readonly.
So first user presses Browse and selects path, then he types filename and
when he is typing, the FileName.text is automatically typed into FilePath
after the path.
Problem: If path is too long the FileName.text is not in the visible area
of FilePath. I need the textbox to be rightaligned.

\\\
Me.TextBox2.Text = Me.TextBox1.Text
Me.TextBox2.SelectionStart = Me.TextBox2.TextLength
Me.TextBox2.ScrollToCaret()
///
 
Thanks, just what I wanted!!!
Herfried K. Wagner said:
\\\
Me.TextBox2.Text = Me.TextBox1.Text
Me.TextBox2.SelectionStart = Me.TextBox2.TextLength
Me.TextBox2.ScrollToCaret()
///
 
Back
Top