Hello again!
To describe my problem more precisely:
It's more a technical than an architectical problem.
Until now i discovered two ways to manipulate the "scroll-position"
of the frame:
Using window messages to move one line up and down, for example
SendMessage(pnlScroll.ThePanel.Handle, WM_VSCROLL, SB_TOP, new
IntPtr(0));
or modify the coordinates of the property "AutoScrollPosition"
in the "Scroll"-Event of the external scrollbar like :
private void sgvScrollBar1_Scroll(object sender,
System.Windows.Forms.ScrollEventArgs e)
{
int modifFactor = 3;
pnlScroll.ThePanel.AutoScrollPosition = new Point(0, e.NewValue *
modifFactor);
}
Both solutions provide scrolling, but until the "AutoScroll" - property
is set to true (i can't do this, you remember ?) both can't scroll
completly down to the bottom (they stop about 2/3 of the way).
I changed the "modifFactor", but that doesn't change.
So my remaining questions are:
1) How do i get a scroll solution that is fully functional
(among other things: Scroll fully to bottom) ?
2) How do i calculate the "min" and "max" property for
the external Scrollbar, so that it fits to the size of
the panel ?
3) Is the event "Scroll"-event of the scrollbar the right
one for this purpose? Do i need other properties / events
of the scrollbar?
Again, thanks in advance
Sascha
Nicholas Paldino [.NET/C# MVP] schrieb:
Sascha,
I would ...