Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Multiline TextBox scrollbar moving up and down on updates

Reply
Thread Tools

Multiline TextBox scrollbar moving up and down on updates

 
 
Avi
Guest
Posts: n/a
 
      08-24-2008
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


 
Reply With Quote
 
 
 
 
Nathan Sokalski
Guest
Posts: n/a
 
      08-26-2008
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
http://www.velocityreviews.com/forums/(E-Mail Removed)
http://www.nathansokalski.com/

"Avi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
>



 
Reply With Quote
 
 
 
 
Avi
Guest
Posts: n/a
 
      08-27-2008
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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
> (E-Mail Removed)
> http://www.nathansokalski.com/
>
> "Avi" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>>

>
>



 
Reply With Quote
 
Nathan Sokalski
Guest
Posts: n/a
 
      08-28-2008
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
(E-Mail Removed)
http://www.nathansokalski.com/

"Avi" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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
>> (E-Mail Removed)
>> http://www.nathansokalski.com/
>>
>> "Avi" <(E-Mail Removed)> wrote in message
>> news:(E-Mail Removed)...
>>> 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
>>>

>>
>>

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Moving Estimate, Local Movers, Long Distance Moving, PackingSupplies, Storage Rental, Home Moving, Apartment Moving, Office Moving,Commercial Moving linkswanted ASP .Net 0 01-06-2008 04:45 AM
Scrollbar Moving Automatically on Tree Expansion - in Java Swing's BasicTreeUI naimish.parikh@gmail.com Java 1 12-29-2005 09:39 PM
MultiLine TextBox, how to remove vertical scrollbar? Olav Tollefsen ASP .Net 1 01-29-2005 10:40 PM
how to define a variable to hold a multiline text input in perl from html multiline textbox dale zhang Perl Misc 8 11-30-2004 06:53 AM
ScrollBar? Does it exist just WEB ScrollBar Control? Alex ASP .Net Web Controls 1 04-04-2004 12:44 AM



Advertisments