TextBox and Scrollbars

Discussion in 'ASP .Net Web Controls' started by msnews.microsoft.com, Jan 2, 2005.

  1. Note: I'm using VS "Whidbey" Beta 1 Refresh.

    I am atttempting to display a modest amount of text using a Textbox control
    on my webapp. I am using the TextBox since it offers the option to format
    the text somewhat (paragraph breaks). The problem I have is that a vertical
    scrollbar appears (greyed out since there isn't *that* much text). I don't
    want them to ever appear. There is no scrollbar property that I can find for
    this beast. What are my options?

    Cheers
    John
    msnews.microsoft.com, Jan 2, 2005
    #1
    1. Advertising

  2. msnews.microsoft.com

    Edge Guest

    msnews.microsoft.com wrote:
    > Note: I'm using VS "Whidbey" Beta 1 Refresh.
    >
    > I am atttempting to display a modest amount of text using a Textbox
    > control on my webapp. I am using the TextBox since it offers the
    > option to format the text somewhat (paragraph breaks). The problem I
    > have is that a vertical scrollbar appears (greyed out since there
    > isn't *that* much text). I don't want them to ever appear. There is
    > no scrollbar property that I can find for this beast. What are my
    > options?
    >
    > Cheers
    > John


    You can achieve this with style sheets.

    Just add a
    style="overflow:hidden"
    attribute to your textbox.

    You can also define a style sheet class with the same style, and assign it
    to the CssClass property of the textbox.

    --

    Edge
    Edge, Jan 2, 2005
    #2
    1. Advertising

  3. Hi John,

    I think you'll want to look at a style attribute for this. The overflow
    attribute lets you set the status of scrollbars:

    http://msdn.microsoft.com/library/d...hor/dhtml/reference/dhtml_reference_entry.asp

    Ken
    Microsoft MVP [ASP.NET]
    Toronto

    "msnews.microsoft.com" <> wrote in message
    news:...
    > Note: I'm using VS "Whidbey" Beta 1 Refresh.
    >
    > I am atttempting to display a modest amount of text using a Textbox
    > control on my webapp. I am using the TextBox since it offers the option to
    > format the text somewhat (paragraph breaks). The problem I have is that a
    > vertical scrollbar appears (greyed out since there isn't *that* much
    > text). I don't want them to ever appear. There is no scrollbar property
    > that I can find for this beast. What are my options?
    >
    > Cheers
    > John
    >
    Ken Cox [Microsoft MVP], Jan 3, 2005
    #3
    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. =?Utf-8?B?TWlrZQ==?=

    CheckBoxList and Scrollbars

    =?Utf-8?B?TWlrZQ==?=, Nov 16, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    660
    =?Utf-8?B?TWlrZQ==?=
    Nov 16, 2004
  2. Blue Streak

    ASP:Panel and Scrollbars...

    Blue Streak, Mar 8, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    3,436
    Blue Streak
    Mar 8, 2005
  3. tshad

    Listbox and Scrollbars

    tshad, Jun 10, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    393
    tshad
    Jun 10, 2005
  4. Google Jenny

    How do I disable scrollbars on a multiline textbox?

    Google Jenny, Oct 1, 2004, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    873
    Google Jenny
    Oct 6, 2004
  5. John McCrae

    TextBox and Scrollbars

    John McCrae, Jan 2, 2005, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    106
    John McCrae
    Jan 2, 2005
Loading...

Share This Page