allow scrolling on a .net textbox where enabled=False

I need to modify a .net textbox to allow it to be scrollable.

1             <div style="overflow: auto; width: 100px;">
2                            <asp:TextBox ID="txtTestParent" runat="server" Width="100px" Height="30px" Enabled="False">
3                            </asp:TextBox>
4                  </div>
but the problem that i have is because the textbox is enabled i cannot scroll and see the text thats to the right .
I cannot change the screensize, textbox size and I must keep the control so its enabled-false. 
Does anyone know how to solve this problem?
I want a textbox that is:
1. enabled=false
2. that i can scroll to see all text that is off to the right.
thanks
 
0
MyronCope
12/14/2007 9:00:53 PM
asp.net.getting-started 91979 articles. 3 followers. Follow

10 Replies
740 Views

Similar Articles

[PageSpeed] 51

Why dont you make the textbox multiline and set readonly = true

 

 <asp:TextBox ID="ddd" ReadOnly="true" runat="server" TextMode="MultiLine"> 


Thanks,
Karan

~ Remember To Mark The Post(s) That Helped You As The ANSWER ~
0
karan
12/14/2007 9:06:31 PM

I tried what you have here and it works for me. What problem are you facing?

Update: No it doesn't let you see anything after the scroll boundaries. But that is the problem even with Enabled = True


Thanks,
Max
Let Me Google That For You!
0
bullpit
12/14/2007 9:07:40 PM

karan@dotnet:
Why dont you make the textbox multiline and set readonly = true <asp:TextBox ID="ddd" ReadOnly="true" runat="server" TextMode="MultiLine"> 

The user wants to scroll horizontally and not vertially.

Update: I take it back.


Thanks,
Max
Let Me Google That For You!
0
bullpit
12/14/2007 9:08:58 PM

thanks for the feedback. some answers:

1. the user needs to be able to scroll left to right if the text runs off the right side of the textbox, i cannot scroll to the right and see all the text if there is a great deal of text with the way the textbox is setup now (code is above)

2.  I cannot change from Enabled=False to be Readonly=True.  I have asked about this and was informed that it would not be consistent with other controls on the page so this is really not my call.

0
MyronCope
12/14/2007 9:12:13 PM

How about using label instead: 

<asp:Label ID="txtTestParent" style="overflow:scroll " runat="server" Width="100px" 
 Height="40px" Wrap="false">aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</asp:Label>
 
Thanks,
Max
Let Me Google That For You!
0
bullpit
12/14/2007 9:33:44 PM

 Try out having a panel outside the textbox something like this:

 <asp:Panel id="pan1" runat="server" Width="100px" Height="40px" ScrollBars="Horizontal">
        <asp:TextBox  ID="TextBox1" runat="server" ></asp:TextBox>
    </asp:Panel>


Thanks,
Karan

~ Remember To Mark The Post(s) That Helped You As The ANSWER ~
0
karan
12/14/2007 9:38:23 PM

thanks for the feedback, i just tried this one:

 

 <asp:Panel id="pan1" runat="server" Width="100px" Height="40px" ScrollBars="Horizontal">
        <asp:TextBox  ID="TextBox1" runat="server" ></asp:TextBox>
    </asp:Panel>

 but the panel is not enabled for some reason

0
MyronCope
12/17/2007 1:20:55 PM
<div style="overflow-x:auto; width: 500px;">  

<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>

</div>


Kotor2000
0
kotor2000
12/17/2007 5:35:05 PM

thank, i just tried the last post, but since Enabled=False is set on my textbox this does not work.

0
MyronCope
12/17/2007 6:52:57 PM

I dont understand , the enabled property should'nt affect the code I sent you...If your textbox is visible and have text in it, a scroll bar will appear if your textbox is bigger than the div properties....can you send code sample please


Kotor2000
0
kotor2000
12/17/2007 7:02:41 PM
Reply:

Similar Artilces:

Get values set by javascript to .net enabled textbox
I have a bit of javasript that writes a value to a text box.  The text box is read only. Textbox code:<input type="text" id="txtColor1" runat="server" readonly="readonly" size="6" /> Snippet from javascript functioncolorBox = document.getElementById('<%= txtColor1.ClientID %>');colorBox.value = colorCode;  Code behind:string color1 = txtColor1.Value Whenever I attempt to get the value out of the text box after it has been changed by the javascript, it always reverts back to the old data and not the new. Anyo...

Net:Net:Net::LDAP::FAQ
------_=_NextPart_001_01C6429F.D89AA417 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hello, Net::LDAP Net::LDAPS Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, ....) password? I don't like to write the secret password to the perl file. Best regards Barbara Wilbert ------_=_NextPart_001_01C6429F.D89AA417-- Wilbert Barbara (CI/OSI) * wrote: > Hello, > > Net::LDAP > Net::LDAPS > > Is there a possible to LDAP bind with an encrypted (SHA, SSHA, CRYPT, > ......

Starting an Ajax.net Application in .net
i am new to ajax.net could any one give me simple ajax,net example so that i start building on my ajax skills please.........  I started with the todolist video on the main asp.net/ajax page, and its all you need to know to get started. http://download.microsoft.com/download/0/f/6/0f651a0f-6f2b-4497-b061-e1b2825e22e0/MSAJAX-ToDoList.wmv Don't forget to click "Mark as Answer" on the post that helped you.This credits that member, earns you a point and marks your thread as Resolved so we will all know you have been helped. http://asp.net/ajax/    ...

Getting Start With .net
hi i'm intersted to learn asp.net (vb or delphi) . i programming with delphi6 but i'd like to tp know something about programming in internet specially with .net . i hear about microsoft.net with delphi 7 that i can programming with delphi in .net .... is it right ? what 's our opinian about it ? and better to learn Vb.Net or continu with delphi(or delphi.net) thanks. Ali Darabian I think there is some support for Delphi in .Net. However, you will find much more support from the user community if you choose a more popular language such as VB.Net or C#. Since your al...

how to get start with .NET
the net help people installed  to my desktop 1-microsoft visual studio .NET enterprise developer 2003 2-microsoft .NET framework 1.1 what else do i need ...???  and how can i try with some simple code in VS.Net and run it to see wat happen...????? please help If you want to develope web applications, then you'll also need IIS on your PC.  That'll require XP-Professional or Windows 2000/2003, but XP-Home edition won't allow IIS installation. As for how to get started, you can search the web for some tutorials or buy a good book on VS.  The topic is way too vast to...

How to get textbox value when textbox properties is readonly or enabled false
Hi ,I have one problem, If u have idea please solve  itTo dispaly canlendercontrol iam using ajax canlender control, after selecting dateof birth into textboxIn textbox keeping textbox properites as readonly or enabled equal false,  getting that textbox value into lable,  ThanksRamesh  Just get the Textbox.Text value?Don't forget to click "Mark as Answer" on the post that helped you. If I understand you correctly, you have a textbox that is disabled/readonly. You use some code to change the value in the textbox, and you want that value to be returne...

I am not getting my mail open on my net as net is running
Name: Email: rmbala91atgmaildotcom Product: Firefox Summary: I am not getting my mail open on my net as net is running Comments: My mail is not getting opening. Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 From URL: http://hendrix.mozilla.org/ Note to readers: Hendrix gives no expectation of a response to this feedback but if you wish to provide one you must BCC (not CC) the sender for them to see it. ...

How to get RS (From VB6) to .NET (VB.NET)
Hi Friends,         I have requirement, there is one function in VB6 it returns a RS, I need to call that function in  VB.NET, how to get those values into .NET, if can any body can help (pass me some code snippets), that will be greate, Thank you.Madhu... -Madhu hey guys i got this one just by using fill method.-Madhu...

Sending SMS using vb.net or C#.net using vb.net or c#.net
Hi  My requirement is I hav one csv file with these fields id,mobilenum,messgae,status.intiallu staus is 0. once i read the all fileds and take that mobile number.using tat mobile number  i need to send sms .after sending sms i shuld change status as 1 How to send sms thru coding (please dont provide any links.if it is provide also please give working links becox i checked codeproject .i didnt get any nice link. and also provide the how to update the status field im csv file   Thank ssandhya   To send SMS, you need some third party SMS providers. if you consul...

Getting started with JScript.NET
I'm a Javascript and Actionscript developer, and the thought of being able to do server-sides in something I know was too good to resist. Does anyone know some good tutorials for developing ASP.NET pages in JScript?  I can find lots of console code, but simple things are hard: like I can't even figure out how to print something out to the web page (just a string). What I'm really trying to do is access a database, verify a login, and print JSON out to the response.  What should I do to start?  Is there a better way to do this? (IE: using some JSON library already?). I'm commun...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

.Net Application generators
There are a few .Net complete n-tier application generators that generate directly from your database. Some even have their own database building tools. They are great and easy to follow and their applications generate real VB.Net and C# code, easy to learn. These are great starts for .Net stuff except for one thing, PRICE. Iron Speed is about $1500 and for the same exact product features ASPNetNow sells for only $279 for their Web Matrix version or $530 for VS version. Another company Avalanche sells for $995. Amazing price ranges. The first two match feature for feature except the first yo...

Net Farmers net
Has anyone been able to access any of the tests at http://suicide.netfarmers.net ? I can get the default page but none of the tests appear to be operating over the last several weeks. -- CK I just tested and works as usual!!!Every session TCP_error,because my Shields_guard is intact<<G>> -- Regard: Joh@nnes´┐Ż 1216771 Ont.Inc. "Nothing is more damaging to a new truth than an old error" "CK" <ckphalon@lascenltd.com> wrote in message news:9i45gg$1qa9$1@news.grc.com... : Has anyone been able to access any of the tests at : http://suicide...

To .NET or not .NET, that is the question
I'm running WinXP pro 32-bit, meaning I've got the version 1-dot-something of .NET that XP came with. I've been looking for various softwares, and more and more often come across .NET version 2 being prerequisite. No urgency for me re. my questions to this group - so far I have just decided to hit the red X on those download pages - but the desire for this newer version of .NET seems to be growing for me. Firstly, according to my (limited) research, newer .NET versions are inclusive of the previous ones, and the current version seems to be 3.5. So if I go for i...

Web resources about - allow scrolling on a .net textbox where enabled=False - asp.net.getting-started

Resources last updated: 12/7/2015 8:14:20 PM