Connecting Tech Pros Worldwide Help | Site Map

Multiline TextBox scrollbar moving up and down on updates

  #1  
Old August 24th, 2008, 08:55 AM
Avi
Guest
 
Posts: n/a
Hi all,

I have a web page with Multiline TextBox. Every 3 seconds I refresh the
page and display all received messages in this TextBox. When the TextBox is
updated (The Text property is set). The vertical scrollbar is flickering
(moving up and down and the scrollbar "square" is starting big and shrinks
when the TextBox is filled). Please note that every refresh more data is
added to the TextBox, and nothing is taken out (Appending new lines to the
existing ones).

How can I avoid this behavior?

Thanks,
Avi


  #2  
Old August 26th, 2008, 03:25 AM
Nathan Sokalski
Guest
 
Posts: n/a

re: Multiline TextBox scrollbar moving up and down on updates


Not to insult your coding skills, but I would check the code you use to set
the Text property. Do you append each message individually, or concatenate
them into a string variable that gets assigned to the Text property? You may
also want to try setting the Text property to String.Empty at the beginning
of your code. Something else that you may want to look into, if you haven't
already, is UpdatePanels from ASP.NET AJAX, if you are only updating the one
Textbox and you are doing it every 3 seconds this could greatly improve the
efficiency of your page, and they are very easy to use. Hopefully some of
this helps.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

"Avi" <rememberoti@yahoo.comwrote in message
news:O7FKM4bBJHA.3392@TK2MSFTNGP03.phx.gbl...
Quote:
Hi all,
>
I have a web page with Multiline TextBox. Every 3 seconds I refresh the
page and display all received messages in this TextBox. When the TextBox
is updated (The Text property is set). The vertical scrollbar is
flickering (moving up and down and the scrollbar "square" is starting big
and shrinks when the TextBox is filled). Please note that every refresh
more data is added to the TextBox, and nothing is taken out (Appending new
lines to the existing ones).
>
How can I avoid this behavior?
>
Thanks,
Avi
>

  #3  
Old August 27th, 2008, 02:35 PM
Avi
Guest
 
Posts: n/a

re: Multiline TextBox scrollbar moving up and down on updates


Thanks,

Yes, I have a string varialbe with all the messages. I did not use an
update panel since the TextBox is the only object on my page.

Nathan , I did not understand how setting the Text property to String.Empty
would help.

"Nathan Sokalski" <njsokalski@hotmail.comwrote in message
news:OrCAaGyBJHA.3484@TK2MSFTNGP04.phx.gbl...
Quote:
Not to insult your coding skills, but I would check the code you use to
set the Text property. Do you append each message individually, or
concatenate them into a string variable that gets assigned to the Text
property? You may also want to try setting the Text property to
String.Empty at the beginning of your code. Something else that you may
want to look into, if you haven't already, is UpdatePanels from ASP.NET
AJAX, if you are only updating the one Textbox and you are doing it every
3 seconds this could greatly improve the efficiency of your page, and they
are very easy to use. Hopefully some of this helps.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/
>
"Avi" <rememberoti@yahoo.comwrote in message
news:O7FKM4bBJHA.3392@TK2MSFTNGP03.phx.gbl...
Quote:
>Hi all,
>>
>I have a web page with Multiline TextBox. Every 3 seconds I refresh the
>page and display all received messages in this TextBox. When the TextBox
>is updated (The Text property is set). The vertical scrollbar is
>flickering (moving up and down and the scrollbar "square" is starting big
>and shrinks when the TextBox is filled). Please note that every refresh
>more data is added to the TextBox, and nothing is taken out (Appending
>new lines to the existing ones).
>>
>How can I avoid this behavior?
>>
>Thanks,
>Avi
>>
>
>

  #4  
Old August 28th, 2008, 02:55 AM
Nathan Sokalski
Guest
 
Posts: n/a

re: Multiline TextBox scrollbar moving up and down on updates


I believe it would help if you showed me your code, sometimes the problem is
something little that you just miss (don't be embarrassed, we all miss
little things that we want to smack ourselves in the face for). Sometimes
the steps we are taking is hard to put into words.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

"Avi" <rememberoti@yahoo.comwrote in message
news:OZH2tlECJHA.1816@TK2MSFTNGP06.phx.gbl...
Quote:
Thanks,
>
Yes, I have a string varialbe with all the messages. I did not use an
update panel since the TextBox is the only object on my page.
>
Nathan , I did not understand how setting the Text property to
String.Empty would help.
>
"Nathan Sokalski" <njsokalski@hotmail.comwrote in message
news:OrCAaGyBJHA.3484@TK2MSFTNGP04.phx.gbl...
Quote:
>Not to insult your coding skills, but I would check the code you use to
>set the Text property. Do you append each message individually, or
>concatenate them into a string variable that gets assigned to the Text
>property? You may also want to try setting the Text property to
>String.Empty at the beginning of your code. Something else that you may
>want to look into, if you haven't already, is UpdatePanels from ASP.NET
>AJAX, if you are only updating the one Textbox and you are doing it every
>3 seconds this could greatly improve the efficiency of your page, and
>they are very easy to use. Hopefully some of this helps.
>--
>Nathan Sokalski
>njsokalski@hotmail.com
>http://www.nathansokalski.com/
>>
>"Avi" <rememberoti@yahoo.comwrote in message
>news:O7FKM4bBJHA.3392@TK2MSFTNGP03.phx.gbl...
Quote:
>>Hi all,
>>>
>>I have a web page with Multiline TextBox. Every 3 seconds I refresh the
>>page and display all received messages in this TextBox. When the
>>TextBox is updated (The Text property is set). The vertical scrollbar
>>is flickering (moving up and down and the scrollbar "square" is starting
>>big and shrinks when the TextBox is filled). Please note that every
>>refresh more data is added to the TextBox, and nothing is taken out
>>(Appending new lines to the existing ones).
>>>
>>How can I avoid this behavior?
>>>
>>Thanks,
>>Avi
>>>
>>
>>
>
>

Closed Thread