Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Panel Auto Scroll - Vertical Only

Status
Not open for further replies.

jonbatts

Programmer
Apr 12, 2005
114
US
I can set a panels ScrollBars property to Vertical, to show only a vertical scrollbar, and Auto, to show scrollbars (vertical and horizontal) only when necessary. Is there a way to get a panel to scroll vertically, but not horizontally, and only when necessary? Sort of like a combination of Auto and Vertical. Thanks, and have a great day.
 
The scrollbars are created by setting the overflow attribute on a HTML element (which is what the Panel does when you set it's ScrollBars property). If what you want to do is possible, then you could apply this solution via CSS, I'd ask in the the HTML forum if it is possible and then you can decide how best to implement it from ASP.NET.


____________________________________________________________

Need help finding an answer?

Try the Search Facility or read FAQ222-2244 on how to get better results.

 
The Auto attribute will tell the browser to show scrollbars only if necessary.

- Scrollbars will usually appear vertically when you have a long text that can't be displayed in a single screen.
- They will usually appear horizontally if you have an element that forces it. A long horizontal image bigger than the width of your panel could force horizontal scroll.

Another something that could force your panel (div tag) to scroll horizontally is a long text with no spaces ("sdkfhkdsjhfkdjshkjsdhfkdjshksdfjlfkhdsjfhkdsjhfkdjsfhkdsjfkdsjfhsdhfhhfhjfhksdjfhdksjfhksdjflkdsjflkj").
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top