B
Bob Dankert
I am having trouble scrolling a panel horizontally to match the horizontal
scroll from a listbox. Currently, I catch the listbox WM_HSCROLL in the
listbox WndPrc, and have this call a method in my Panel to scroll the panel.
The method is:
public void ScrollMeHorizontal(System.IntPtr wParam)
{
System.Windows.Forms.Message ScrollMessage = new Message();
ScrollMessage.HWnd = this.Handle;
ScrollMessage.Msg = 0x0114;
ScrollMessage.WParam = wParam;
this.DefWndProc(ref ScrollMessage);
MessageBox.Show("Test");
}
The message box is displaying 'test', so I know the method is getting
called, however the panel is not being scrolled at all. For reference, the
panel contains two labels side by side, and right-most label is half cut-off
and should scroll.
(As you can probably guess, I am implementing my own column headers for a
list box - and if your wondering, netiehr a listview nor datagrid will work
for my application.)
Thanks!
Bob Dankert
scroll from a listbox. Currently, I catch the listbox WM_HSCROLL in the
listbox WndPrc, and have this call a method in my Panel to scroll the panel.
The method is:
public void ScrollMeHorizontal(System.IntPtr wParam)
{
System.Windows.Forms.Message ScrollMessage = new Message();
ScrollMessage.HWnd = this.Handle;
ScrollMessage.Msg = 0x0114;
ScrollMessage.WParam = wParam;
this.DefWndProc(ref ScrollMessage);
MessageBox.Show("Test");
}
The message box is displaying 'test', so I know the method is getting
called, however the panel is not being scrolled at all. For reference, the
panel contains two labels side by side, and right-most label is half cut-off
and should scroll.
(As you can probably guess, I am implementing my own column headers for a
list box - and if your wondering, netiehr a listview nor datagrid will work
for my application.)
Thanks!
Bob Dankert