468,103 Members | 1,319 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,103 developers. It's quick & easy.

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
Oct 11 '08 #1
1 1248
kenobewan
4,871 Expert 4TB
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.
Oct 11 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by Wilfried Mestdagh | last post: by
2 posts views Thread by Brian Basquille | last post: by
3 posts views Thread by Casper | last post: by
13 posts views Thread by StillStuckOnJava | last post: by
1 post views Thread by Visual Systems AB \(Martin Arvidsson\) | last post: by
10 posts views Thread by Rob | last post: by
1 post views Thread by Solo | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.