How to know the length of textbox visible region

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • anupalavila
    New Member
    • Jul 2008
    • 2

    How to know the length of textbox visible region

    Hi
    me with C#.net , I have 2 textboxes and a string s="Hai to all in bytes forum"
    I am assigning this string s to textbox1.test. How can I do such a way that if textbox1.text visible portion exceeds the string s the balance portion can be assigned to textbox2.text

    ie, if textbox1.text can accommodate till "Hai to all in byt", how can I cut it with "bytes forum" and place it in textbox2.text

    Thanks in advance
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Either set the textbox size first in the code or count the chars in the string and then set the size. In your logic you may want to have a max size regardless of char count and / or set the multiline to true for large strings. HTH.

    Comment

    Working...