Click here to Skip to main content
15,905,148 members
Home / Discussions / C#
   

C#

 
GeneralText Box Selection Pin
StyleGuide31-Jan-08 3:36
StyleGuide31-Jan-08 3:36 
Hi there,

Does anybody know how I can select the entire contents of a text box from the end to the start? (thus allowing the start to be displayed in the text box, if the text is too long to fit).

Below is (obviously) selecting from left to right:

this.txtName.SelectionStart = 0;<br />
this.txtName.SelectionLength = txtName.Text.Length;


so I need something like:

this.txtName.SelectionStart  = txtName.Text.Length;<br />
this.txtName.SelectionEnd = 0;


but Text Box has no SelectionEnd Property...

Thanks!
GeneralRe: Text Box Selection Pin
CKnig31-Jan-08 3:46
CKnig31-Jan-08 3:46 
GeneralRe: Text Box Selection Pin
StyleGuide31-Jan-08 4:37
StyleGuide31-Jan-08 4:37 
GeneralRe: Text Box Selection Pin
Skippums31-Jan-08 4:52
Skippums31-Jan-08 4:52 
GeneralRe: Text Box Selection Pin
StyleGuide31-Jan-08 22:47
StyleGuide31-Jan-08 22:47 
GeneralRe: Text Box Selection Pin
Skippums1-Feb-08 0:11
Skippums1-Feb-08 0:11 
GeneralRe: Text Box Selection Pin
StyleGuide1-Feb-08 4:29
StyleGuide1-Feb-08 4:29 
GeneralRe: Text Box Selection Pin
Skippums1-Feb-08 5:31
Skippums1-Feb-08 5:31 
GeneralRe: Text Box Selection Pin
StyleGuide4-Feb-08 5:56
StyleGuide4-Feb-08 5:56 
Generalprogram disables the application Pin
Saamir31-Jan-08 3:28
Saamir31-Jan-08 3:28 
GeneralRe: program disables the application Pin
Justin Perez31-Jan-08 3:51
Justin Perez31-Jan-08 3:51 
GeneralRe: program disables the application Pin
Saamir31-Jan-08 4:07
Saamir31-Jan-08 4:07 
GeneralRe: program disables the application Pin
Justin Perez31-Jan-08 4:15
Justin Perez31-Jan-08 4:15 
GeneralRe: program disables the application Pin
Saamir31-Jan-08 5:36
Saamir31-Jan-08 5:36 
QuestionLDAP Path Attribute sequence ??? Pin
Paw Jershauge31-Jan-08 3:22
Paw Jershauge31-Jan-08 3:22 
GeneralRe: LDAP Path Attribute sequence ??? Pin
Justin Perez31-Jan-08 3:53
Justin Perez31-Jan-08 3:53 
GeneralRe: LDAP Path Attribute sequence ??? Pin
Paw Jershauge31-Jan-08 4:01
Paw Jershauge31-Jan-08 4:01 
GeneralRe: LDAP Path Attribute sequence ??? Pin
Dave Kreskowiak31-Jan-08 5:00
mveDave Kreskowiak31-Jan-08 5:00 
GeneralRe: LDAP Path Attribute sequence ??? Pin
Paw Jershauge31-Jan-08 7:47
Paw Jershauge31-Jan-08 7:47 
GeneralError in searching Directories Pin
chanzeb31-Jan-08 2:18
chanzeb31-Jan-08 2:18 
GeneralRe: Error in searching Directories Pin
Justin Perez31-Jan-08 2:24
Justin Perez31-Jan-08 2:24 
QuestionHow can I change the windows service name during setup? Pin
astanton197831-Jan-08 1:52
astanton197831-Jan-08 1:52 
AnswerRe: How can I change the windows service name during setup? Pin
PIEBALDconsult31-Jan-08 5:07
mvePIEBALDconsult31-Jan-08 5:07 
QuestionHow to send parameter to another program? Pin
Affan Toor31-Jan-08 1:52
Affan Toor31-Jan-08 1:52 
GeneralRe: How to send parameter to another program? Pin
Anthony Mushrow31-Jan-08 2:12
professionalAnthony Mushrow31-Jan-08 2:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.