Multiline TextBox scrollbar moving up and down on updates

Discussion in 'ASP .Net' started by Avi, Aug 24, 2008.

  1. Avi

    Avi Guest

    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
    Avi, Aug 24, 2008
    #1
    1. Advertising

  2. 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.nathansokalski.com/

    "Avi" <> wrote in message
    news:...
    > 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
    >
    Nathan Sokalski, Aug 26, 2008
    #2
    1. Advertising

  3. Avi

    Avi Guest

    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" <> wrote in message
    news:...
    > 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.nathansokalski.com/
    >
    > "Avi" <> wrote in message
    > news:...
    >> 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
    >>

    >
    >
    Avi, Aug 27, 2008
    #3
  4. 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

    http://www.nathansokalski.com/

    "Avi" <> wrote in message
    news:...
    > 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" <> wrote in message
    > news:...
    >> 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.nathansokalski.com/
    >>
    >> "Avi" <> wrote in message
    >> news:...
    >>> 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
    >>>

    >>
    >>

    >
    >
    Nathan Sokalski, Aug 28, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Olav Tollefsen
    Replies:
    1
    Views:
    40,659
    Ken Cox [Microsoft MVP]
    Jan 29, 2005
  2. =?Utf-8?B?dGhlIGZyaWVuZGx5IGRpc3BsYXkgbmFtZQ==?=

    Strange behavior with multiline textbox and opera

    =?Utf-8?B?dGhlIGZyaWVuZGx5IGRpc3BsYXkgbmFtZQ==?=, Aug 22, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    418
    =?Utf-8?B?dGhlIGZyaWVuZGx5IGRpc3BsYXkgbmFtZQ==?=
    Aug 22, 2005
  3. Replies:
    1
    Views:
    3,662
    Andrey Kuznetsov
    Dec 29, 2005
  4. Alex

    ScrollBar? Does it exist just WEB ScrollBar Control?

    Alex, Apr 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    257
    Alvin Bruney [MVP]
    Apr 4, 2004
  5. dale zhang
    Replies:
    8
    Views:
    407
    Tintin
    Nov 30, 2004
Loading...

Share This Page