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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Remove Horizontal Scrollbar (from TabPage).

Status
Not open for further replies.

bbCincinnati

Programmer
Aug 21, 2008
14
US
Windows Mobile 6
C#
Visual Studio 2005


Hi Folks,

How can I hide the Horizontal ScrollBar from my TabPage while still showing the Vertical one?

I'm creating a Windows Mobile 6 application. I'm programmatically shortening my TabControl, which in turn automatically shortens my TabPages. I have the TabPage's AutoScroll property set to true, so both ScrollBars (vert, and hor) automatically appear when they're supposed to. Great :eek:)

However, I would actually like to have the horizontal one not show.

Can anyone give me a pointer?

Thank you
 
You should be able to use a CSS solution.
Identify the correct DIV or other container to apply this CSS to:

overflow-x: hidden; <- for no horizontal scrolling
overflow-y: auto; <- for vertical scrolling

or you can use visible to allow the horizontal content to render outside of the container.

I hope that helps.

Travis Hawkins
jobs.bestcodingpractices.com
 
Hi Travis,

Thanks for your reply. I'm somewhat new to C-Sharp / .Net so I might be misunderstanding. When you say CSS, I'm thinking Cascading Style Sheets for a browser-based application. Is that what you meant? My application is not a browser-based app. I'm just using regular windows (mobile) forms. (System.Windows.Forms.Form).

Thanks again for your help!

bb
 
sorry bb,

once I again I get in trouble for not reading the whole post. I was giving a browser based solution.

For windows forms controls I haven't done this myself but I remember reading a post that explained doing this using the AutoScale Property with some setting or other. You might want to look into that.

Travis Hawkins
jobs.bestcodingpractices.com
 
Hi Travis,

No apology necessary :eek:) Thank you for trying to help. Actually, you did help. Thanks for the tip about the AutoScale property. That is probably what will fix my problem.

Thanks again :eek:)

bb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top