473,466 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Scrolling panel

Hi,

I have a panel on a form that contains a number of controls, so many that
the panel has a vertical scrollbar in order to view all of them. When the
form first loads, the panel's scrollbar automatically scrolls to about the
middle rather than staying at the top. Also, when I click on one of the
controls, a dialog box appears to allow me to edit it's information. When I
click OK on the dialog box, the information on the control is changed, and
the panel's scrollbar once again scrolls to the middle. This last scenario
only happens once, on the first control I click. After that everything
works as it should. Does anyone have any idea what's going on, or what
event is firing to cause the panel to scroll automatically sometimes?

Thanks,
Nathan
Nov 21 '05 #1
2 4761
Hi,

Make sure the panels autoscrollpostion, and autoscrollmargin are set
to 0,0

http://msdn.microsoft.com/library/de...argintopic.asp

http://msdn.microsoft.com/library/de...itiontopic.asp

Ken
---------------
"Nathan" <nk*********************@softhome.net> wrote in message
news:ej**************@TK2MSFTNGP11.phx.gbl...
Hi,

I have a panel on a form that contains a number of controls, so many that
the panel has a vertical scrollbar in order to view all of them. When the
form first loads, the panel's scrollbar automatically scrolls to about the
middle rather than staying at the top. Also, when I click on one of the
controls, a dialog box appears to allow me to edit it's information. When I
click OK on the dialog box, the information on the control is changed, and
the panel's scrollbar once again scrolls to the middle. This last scenario
only happens once, on the first control I click. After that everything
works as it should. Does anyone have any idea what's going on, or what
event is firing to cause the panel to scroll automatically sometimes?

Thanks,
Nathan

Nov 21 '05 #2
Thanks Ken. The properties are set correctly in the designer, and I've also
tried the following code:

Me.pnlPCard.AutoScrollMargin = New Size(0, 0)
Me.pnlPCard.AutoScrollPosition = New Point(0, 0)

I've tried this at the beginning and end of my form_load subroutine as well
as in the designer generated code. Still getting the strange behavior. The
controls are all added at design time, if that makes a difference.

Thanks,
Nathan
Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Amrit | last post by:
Hi Can anyone help me? I would really appreciate I am trying to scroll Groupboxes inside the panel when i hold panel's scroll bar and drag up and down. Such as Internet explorer where you can hold...
4
by: Nathan | last post by:
I need a panel with only a vertical or only a horizontal scroll bar. Is there a way to do that? Nathan
0
by: Al | last post by:
Hi, I am using large PictureBox inside a Panel, user can write on the PictureBox (it is actually InkPicture) but the problem that I have is regarding the Auto scrolling of the panel.. For...
5
by: Sam | last post by:
Hi, I would like to reproduce the same control as in Visual Studio for the propery editor or the message feedback window. That is, a scrolling panel that would appear when the mouse is over one of...
1
by: John | last post by:
Can I use the Atlas controls to create a scrolling panel in a webform? Basically I want a master page that defines 90% of the screen height to be a workspace, with 5% top and bottom for other...
0
by: Elroyskimms | last post by:
I have a fixed witdth panel control with horizontal scrollbars. In it, I load a table and in each table cell is an instance of a user control that I created it. In theory, 3-5 of these controls are...
2
by: shahoo | last post by:
Hi, I am trying to add some controls (say buttons) to a panel. At some stage the controls are too much to be show on the panel, so I set the Autoscroll property of the panel to true. But my...
0
by: mike | last post by:
Hi guys, I have a windows form and on load event I dynamically created a panel and dynamically create/add pictureboxes to panel and added a panel to the form with docking with fill. I am...
4
by: mateusz.zajakala | last post by:
Hi, I have panel (with autoscroll property) on which I'm dynamicaly adding of controls. When I want to scroll my panel using scrollbars it freezes all the controls added on that panel, makes...
2
by: luker | last post by:
Hi Experts, I'm trying to create a panel-derived class with Autoscroll = true that scrolls horizontally when using <Shift>+Mousewheel. Sounds like a straight forward task, doesn't it? I tried...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.