FlowLayout Panel - Scroll control into view not working

0
0

I have a flowlayout panel into which I add user controls with the following code:

this.flp_Hearings.Controls.Add(ucItem);
this.flp_Hearings.ScrollControlIntoView(ucItem);

I ahve the following flow layout panel properties set:

Autoscroll = true

Flow Direction = TopDown

WrapContents = false

 

Am I missing something ?

Any other way to get my newly added item into view ?

  • You must to post comments
1
0

I solved this myself Via a post on Stack Overflow site: Instead of using the ScrollIntoView method – used the following:

 

ucBatchItem ucItem = new ucBatchItem();
ucItem.Parent = this.flp_Hearings;
this.ActiveControl = ucItem;
this.flp_Hearings.Controls.Add(ucItem);
// this.flp_Hearings.ScrollControlIntoView(ucItem);   ** not used

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.