Readonly textbox with scroll

Discussion in 'ASP .Net' started by pv_kannan@yahoo.com, Apr 25, 2005.

  1. Guest

    Hello,
    I am stuck with a problem trying to mimic the behavior of a Windows
    Forms Readonly textbox in HMTL/ASP.NET.

    Basically, I would like the text to be readonly and overflow the
    textbox (overflow attribute) with the user being able to scroll thru
    the text using the arrow keys within the textbox.

    I managed to get the readonly and the overflow part to work but cannot
    figure out a way to let the user place the cursor within the box and
    allow scrolling within a readonly textbox.

    Any help would be very appreciated....

    Thanks
    Kannan
    , Apr 25, 2005
    #1
    1. Advertising

  2. Eli Heifetz Guest

    Hi,

    I think old good html will fit your needs:

    <div
    style="height:40px; width:40px; overflow-y:scroll; display:block;
    border: 1px solid black">
    aaaaa
    bbbbb
    ccccc
    ddddd
    eeeee
    fffff
    ggggg
    </div>

    Click inside and scroll with arrows...
    Eli Heifetz, Apr 25, 2005
    #2
    1. Advertising

  3. Arne Guest

    Once upon a time *Eli Heifetz* wrote:
    > Hi,
    >
    > I think old good html will fit your needs:
    >


    Who's and what needs? Quote the part you are replying to, no more and
    no less!

    --
    /Arne

    Top posters will be ignored. Quote the part you
    are replying to, no more and no less! And don't
    quote signatures, thank you.
    Arne, Apr 25, 2005
    #3
  4. mscir Guest

    wrote:

    > Hello,
    > I am stuck with a problem trying to mimic the behavior of a Windows
    > Forms Readonly textbox in HMTL/ASP.NET.
    > Basically, I would like the text to be readonly and overflow the
    > textbox (overflow attribute) with the user being able to scroll thru
    > the text using the arrow keys within the textbox.
    > I managed to get the readonly and the overflow part to work but cannot
    > figure out a way to let the user place the cursor within the box and
    > allow scrolling within a readonly textbox.
    > Any help would be very appreciated....
    > Thanks
    > Kannan


    This works in my IE 6, Netscape 7.2, Firefox 1.0.3:

    textarea{
    border: 2px solid brown;
    width: 300px;
    height: 200px;
    }

    <body>
    <textarea readonly="true" enabled="true">
    This is my textbox. This is my textbox. This is my textbox. This is my
    textbox.....
    </textarea>
    mscir, Apr 25, 2005
    #4
  5. Zoe Brown Guest

    <> wrote in message
    news:...
    > Hello,
    > I am stuck with a problem trying to mimic the behavior of a Windows
    > Forms Readonly textbox in HMTL/ASP.NET.


    why do you need to mimic it ?
    Zoe Brown, Sep 12, 2005
    #5
    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. doug albright
    Replies:
    0
    Views:
    460
    doug albright
    Aug 30, 2003
  2. Angela Chen
    Replies:
    3
    Views:
    9,024
    parshuram
    Dec 6, 2004
  3. =?Utf-8?B?SmltIEhlYXZleQ==?=

    Textbox Readonly

    =?Utf-8?B?SmltIEhlYXZleQ==?=, Jun 30, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    560
    =?Utf-8?B?SmltIEhlYXZleQ==?=
    Jun 30, 2005
  4. =?Utf-8?B?THluZXJz?=

    conditional readonly textbox in a datagrid

    =?Utf-8?B?THluZXJz?=, Nov 11, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,235
    =?Utf-8?B?THluZXJz?=
    Nov 11, 2005
  5. Jonathan Hyatt
    Replies:
    1
    Views:
    1,862
    Jonathan Hyatt
    Jun 8, 2004
Loading...

Share This Page