Using WinForms and C#:
I have a panel that contains a groupbox, some checkboxes, and textboxes. This panel is not always visible. Depending on user selections I show the panel. However, the screen is large enough that it requires scrollbars depending on your screen resolution.
Does anyone know why the panel would move based on the AutoScrollPosition? I cannot find why it jumps around. I am not changing the location anywhere in the code. I have found a work around that I have listed below. But it would be nice to understand why it is happening.
if (m_PanelHoist.Location.Y != m_GroupBoxDrag.Location.Y)
{
Point point = m_PanelHoist.Location;
point.X += AutoScrollPosition.X;
point.Y += AutoScrollPosition.Y;
m_PanelHoist.Location = point;
}