Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a windows form textbox and a browse button. when i clicks the browse button a folder selection dialog pops up and iam able to select a folder which will be shown in the text box

suppose my full folder path is "A:/somefolder/subfolder1/subfolder2"

My text box content is like

A:/somefolder/subfolder1/su

But i want my text box to look like

older/subfolder1/subfolder2

Thanks in advance.
Posted

The TextAlign property looks like it will satisfy your requirement.

txtFolderName.TextAlign = HorizontalAlignment.Right 
 
Share this answer
 
Try this:


C#
yourTextBox.SelectionStart = yourTextBox.TextLength;

VB.NET
yourTextBox.SelectionStart = yourTextBox.TextLength



Hope this helps.
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900