winforms - Why text box text not showing from starting position in c#? -


i confused this. please consider below scenario.

scenario:
have c# winform app few textbox controls. when input data in these text boxes, example, "this sample textbox", overlaps textbox's visible area , displaying "ample textbox". want text displayed starting position "this s" , if needed, overlaps. how can this? have tried below no luck. please help. thanks.

(sender textbox).textalign = horizontalalignment.left; 

edit
using autocompletemode.suggest when press key, corresponding list displayed similar dropdownlist. first item of list selected default, not want. can please suggest in also. thanks.

final solution
using solve issue

(sender textbox).textalign = horizontalalignment.left; (sender textbox).select(0, 0); 

thanks @har har.

i found solution, position cursor @ beginning of contents of textbox control, call select method , specify selection start position of 0, , selection length of 0.

private void form1_load(object sender, eventargs e)     {         textbox1.text = "hello sample application";         textbox1.select(0, 0);     } 

it show cursor position @ 0 index, it's working.


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

javascript - addthis share facebook and google+ url -

ios - Show keyboard with UITextField in the input accessory view -