By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,908 Members | 1,812 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,908 IT Pros & Developers. It's quick & easy.

Readonly textbox with scroll

P: n/a
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

Jul 24 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
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...

Jul 24 '05 #2

P: n/a
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.
Jul 24 '05 #3

P: n/a
pv*******@yahoo.com 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>
Jul 24 '05 #4

P: n/a

<pv*******@yahoo.com> wrote in message
news:11*********************@z14g2000cwz.googlegro ups.com...
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 ?
Sep 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.