473,386 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Readonly textbox with scroll

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
4 36175
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
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
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

<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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: pv_kannan | last post by:
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...
10
by: GP | last post by:
Is it possible to iterate through all the controls collection and make the textboxes alone as read only.I don't see a readonly property for the Control.Can some one help me in this context? I...
3
by: Lyners | last post by:
I am having a hard time with this one, and I thought it would be easy. I have a datagrid in which I have textboxs for users to enter data. One of the fields in the database behind the datagrid...
2
by: Marcin Floryan | last post by:
I am creating a custom control (Inherits UserControl) and my control containt a TextBox control. TextBox control has a Property called "ReadOnly". I would like to expose this property outside my...
4
by: Doug Bell | last post by:
Hi, I needed to make a TextBox on a DataGrid ReadOnly based on the condition of another cell on its row. I achieved this using a Custom Data Column Class "DacDGTextColLotNo" but I can't get the...
9
by: ShaneFowlkes | last post by:
Hey guys... I have a form that asks for several dates. I tried using asp calendar controls to set values of the date textboxes which were readonly. I found this annoying since each time I...
1
by: Thierry | last post by:
Hi, We are currently upgrading our .Net web apps from framework 1.1 to 2.0 Everything is going quite smoothly except a bug with textbox value not rendered when having propery readonly=true on the...
4
by: H-S | last post by:
Please help. This is a real puzzler! Originally posted on microsoft.public.dotnet.framework.windowsforms but no answer found! I have a read-only textBox which shows the results of a selection...
2
by: johnlim20088 | last post by:
Hi Someone please help me string typ; if (e.Row.RowType == DataControlRowType.DataRow) { typ = e.Row.Cells.Text;
2
by: preeti13 | last post by:
Hi I have a readonly textbox i want to put the today date in there on th epage load but don't have any idea how to getthe dat inthere please help me here is my code: <%@ Page language="c#"...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.