Question

I have this code (edit box is a text box) The purpose of the code is that if i have focus in one of the dinamic text box of list view if i press tab i need to pass to the successive text box. But i also have to scroll the bar else i can't see the textbox, i need to scroll the bar by text box widht but this code doens't work.) :

                 static extern IntPtr SendMessage(IntPtr hWnd, uint Msg, UIntPtr wParam, IntPtr lParam);
                   SendMessage(base.Handle, (uint)WM_HSCROLL, (System.UIntPtr)editBox.Width, (System.IntPtr)1); 

But doesn't work, only work with (System.UIntPtr)ScrollEventType.SmallIncrement or other proprieter of ScrollEventType, but the value of these is not visible. How can I pass an integer and move the scroll bar horizontal how i want?

Was it helpful?

Solution

Try putting the listview into a Panel, and use the panel's ScrollControlIntoView method to scroll the textbox into view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top