Readonly textbox with scroll

P

pv_kannan

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
 
E

Eli Heifetz

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...
 
A

Arne

Once said:
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.
 
M

mscir

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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top