Setting focus messes up scroll position
-
Hi all, Weird problem: When I set focus to a scrolled control, it resets the scroll position to (0, 0). This happens with three different methods for setting focus: Focus (), Select (), and setting the parent's ActiveControl. Resetting the correct scroll position after setting focus doesn't work: The scrollbars disappear! MSDN doesn't even mention this phenomenon. A solution is proposed here http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/437437c8-9548-4e68-8f17-356f848f379d[^] but has no effect for me. Any suggestions how I can set focus to a control without screwing up the scroll position? Thanks!
-
Hi all, Weird problem: When I set focus to a scrolled control, it resets the scroll position to (0, 0). This happens with three different methods for setting focus: Focus (), Select (), and setting the parent's ActiveControl. Resetting the correct scroll position after setting focus doesn't work: The scrollbars disappear! MSDN doesn't even mention this phenomenon. A solution is proposed here http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/437437c8-9548-4e68-8f17-356f848f379d[^] but has no effect for me. Any suggestions how I can set focus to a control without screwing up the scroll position? Thanks!
I presume this control has items such as ListViewItem. I hope you do not force it to refresh any items in it
-
Hi all, Weird problem: When I set focus to a scrolled control, it resets the scroll position to (0, 0). This happens with three different methods for setting focus: Focus (), Select (), and setting the parent's ActiveControl. Resetting the correct scroll position after setting focus doesn't work: The scrollbars disappear! MSDN doesn't even mention this phenomenon. A solution is proposed here http://social.msdn.microsoft.com/Forums/en-US/winforms/thread/437437c8-9548-4e68-8f17-356f848f379d[^] but has no effect for me. Any suggestions how I can set focus to a control without screwing up the scroll position? Thanks!