Hi,
I have a FlowPanelControl and a custom user control (contains a label and button). I am adding instances of the custom user control to the controls collection of the panel, which flow beneath each other as expected; showing the vertical scroll bar fine too.
When a user clicks a button within one of the added user controls, it starts a timer and writes the elapsed time to the label. When multiple instances of the user control are present, there are multiple buttons with labels; all of which can be started and stopped as required. Think of them as a mini stopwatch.
My problem is that writing to the labels is changing the scroll bar location of the containing flow panel. If you scroll to the bottom and the last user control to be started was first in the list, it moves focus back up to the top.
I have tried preventing focus on the buttons but don't think this is the problem.
Does anyone know what could be causing this? Any help would be much appreciated, thanks.