473,387 Members | 1,569 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,387 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

Nov 19 '05 #1
4 1467
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...

Nov 19 '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.
Nov 19 '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>
Nov 19 '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 ?
Nov 19 '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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.