Login  
Search All Forums
Dart Home | PowerWEB TextBox for ASP.NET | Custom Development Reply | PowerWEB TextBox for ASP.NET Topics | Forums   
AuthorForum: PowerWEB TextBox for ASP.NET
Topic: Disabling Horizontal Scrolling in PowerWEB TextBox
smartybird

From: Fayetteville, NY USA
Posts: 6
Member Since: 07/03/07
posted October 30, 2007 1:56 PM

Is there a way to permanently disable the horizontal scroll bar in a textbox.

I have created several forms that have no properies changed from the default with the single exception that I have set

textWindowFormat.size = 12pt

It is fine for the vertical scroll bar to be displayed when there is more text than will fit inside. The horizontal scroll appears with the first "wrap" and my customer will be VERY happy if I can disable it.

Thanks to all for your help!

Fred
smartybird

From: Fayetteville, NY USA
Posts: 6
Member Since: 07/03/07
posted October 30, 2007 2:21 PM

Just to clarify, both the horizontal and vertical scroll bars appear when the text exceeds the vertical length of the textbox.

It would be ideal if only the vertical scroll appeared and not the horizontal.

Thanks again!
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted October 31, 2007 8:52 AM

Hi Fred,
I guess I need some clarification.

When I run the page, and hit enter a few times, the vertical bar appears, but not the horizontal.
From your description, I thought I would see both.

What else is required?
Also, what is textWindowFormat.size?
(I tried setting Font.Size to 12pt, but that did not change my results).

Thanks,
-ken
smartybird

From: Fayetteville, NY USA
Posts: 6
Member Since: 07/03/07
posted October 31, 2007 10:35 AM

I have also sent this to you as an e-mail with the two pages & web.config attached.
---

Ken:

Thanks for your reply!

I can replicate the problem quite easily so I have attached two VB.NET pages.

Testpage - I created a new page, dropped the control on the form, made no changes. When I simply press enter until I pass the bottom of the form I receive BOTH a horizontal and vertical scroll bar.

Testpage2 - This is a new form with the following changes and the same problem:

1) TabStrip.visable = false
2) All toolbar items are deleted then the print button is added back
3) Textbox Width is dragged to be 700
4) Textwindow.Font.Size=12px

I have also included the web.config file just in case.

Thanks for taking a look at this - if there is anything I can change to remove the horizontal scroll I'll be VERY happy!

Fred Nelson

K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted October 31, 2007 3:52 PM

Hi Fred,
Looks like the difference between seeing the scrollbar and not is with the DOCTYPE element.
If I use this:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

the horizontal scroll does not show.

Doing this should not have a negative effect on your page.

Hope it helps,
-ken
smartybird

From: Fayetteville, NY USA
Posts: 6
Member Since: 07/03/07
posted October 31, 2007 4:44 PM

Hi Ken:

Unfortunately the change in the HTML you gave me does not make any difference.

Both the horizontal and vertical scroll bars appear when the box is full when only the vertical bar should.

Help!

Thanks, Fred
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted November 1, 2007 10:34 AM

Hi Fred,
Do the samples show the same behavior for you?

When I made the switch, the HtmlBox stopped showing the horizontal bar after I hit return a few times.

Please make sure the Rebuild your Project, and make sure the browser is not caching the page.

If you create a new page and change the DOCTYPE before running the first time, do you still see the problem?

Thanks,
-ken
smartybird

From: Fayetteville, NY USA
Posts: 6
Member Since: 07/03/07
posted November 1, 2007 11:36 AM

Hi Ken:

The sample pages on your site work fine - the only one that had a scrollbar was the "Web Content" demo. Its text had a large table inserted - when I deleted it and just pressed enter I did not get a horizontal scrollbar.

I did as you asked:

1) I cleared the cache on my development PC
2) Created a new page with the !DOCTYPE you sent me yesterday
3) Rebuilt the project
4) Viewed the new page and pages from yesterday

In every case the horizontal scroll appeared and it did not disapear when I added additional carriage returns.

Next I deployed the solution to a Windows 2003 server. I tested the screens with the following computers - all cache was cleared before connecting:

1) Vista - IE7
2) XP - IE7
3) XP - IE6
4) 2000 - IE6
5) Win98 - IE6

In each case - on each of the three screens - the horizontal scrollbar appeared and did not disapear with additional carriage returns.

I hope this helps!

Thanks again,

Fred
danzman

From: Orland Park, IL USA
Posts: 8
Member Since: 07/21/07
posted November 27, 2007 9:21 AM

In a previous post I have seen something like this:

<HTML>
 <HEAD>
 <script>
  function fixHtmlBox(){
   var pNode = pwCurHtmlBox.parentNode;
   pNode.style.overflowY = "auto";
   pNode.style.overflowX = "visible";
  }
 </script>
 </HEAD>
 <body onload="fixHtmlBox()">
  <form id="Form1" method="post" runat="server">
   <cc1:HtmlBox id="HtmlBox1" runat="server" Height="100%" Width="100%"></cc1:HtmlBox>
  </form>
 </body>
</HTML>

According to that thread it works. I tried it with MasterPage-Content-based web app and it did not work. Any other way to do this?
K M Drake



From: Utica, NY USA
Posts: 3406
Member Since: 07/14/00
posted November 27, 2007 12:49 PM

Hi,
I just tried this with a project utilizing MasterPages, and saw the same results as I previously reported.

1. I created a new Project, added the MasterPage and the Content Page.

2. I added the HtmlBox, built and ran.

3. I saw the horizontal scrollbar.

4. I replaced the MasterPage DOCTYPE with
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

5. I opened the Content page in the designer, and the HtmlBox Height had decreased.
(This is a indication that the scrollbar will no longer appear when run)

6. I ran the project again, and this time the scroll did not appear.

There was no need to add the fixHtmlBox script.

Hope it helps,
-ken
Reply | PowerWEB TextBox for ASP.NET Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX