Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 8th, 2005, 03:52 PM
Authorized User
 
Join Date: Jun 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Scrollable Control - Alternatives?

Hi Gurus,

I am attempting to derive a User Control from the ScrollableControl class. I need to have control over which scrollbars get displayed.

According to MSDN:
"To manually override which scroll bars are visible, set the VScroll and HScroll properties. If either property is set to false, the corresponding scroll bar will not be visible, even if the AutoScroll property is set to true."

However, I am either using it incorrectly, or finding that this is not true. I set the HScroll property of the control to false
Code:
this.HScroll = false;
but still get the scrollbar. Through debugging, I've found that the HScroll property of the control is, in fact, false.

Short of programming scrollbars "old school" style, does anybody know of an alternative?

Thanks,
Paul
 
Old March 8th, 2005, 04:41 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Try setting AutoScroll and VScroll to false also, see if it was a design flaw.

Brian
 
Old March 8th, 2005, 04:57 PM
Authorized User
 
Join Date: Jun 2003
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

VScroll acts exactly like HScroll.

AutoScroll must be set to true; otherwise, there will be no automatic scrolling.

Thanks,
Paul
 
Old March 15th, 2005, 02:09 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You want scrolling? So what is the problem?

Brian
 
Old April 5th, 2006, 03:26 AM
Registered User
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to JesseMwb
Default

I have the same problem. I want have a vertical scroll, but do not want the HScroll. So I set the AutoScroll= true, and the VScroll= true HScroll= false, but when I resize the control, both the HScroll and the VScroll will see.
Is anyone know how to let a panel has a VScroll only?
Thanks!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternatives to QueryString in 2-page Mstr/Detail wirerider ASP.NET 2.0 Professional 4 July 24th, 2006 01:21 PM
sql:is-constant Alternatives aowen355 XML 0 June 30th, 2005 06:52 AM
scrollable window crmpicco Javascript How-To 2 February 11th, 2005 03:56 AM
Alternatives to Crystal. mburley Crystal Reports 1 February 1st, 2005 06:47 PM
Querystring Alternatives lukemedway_uk Classic ASP Basics 1 October 7th, 2003 08:45 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.