Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
245
Flickering when adding TableLayoutPanel in ControlContainerTool
posted

Hi,

 I have an annoying bug when adding a TableLayoutPanel to a ControlContainerTool at runtime and was wondering if anyone can help?. This is my code:

 

 TableLayoutPanel pnlSearch = new TableLayoutPanel(); 

 string searchParamsContainerKey = GroupName;

 ControlContainerTool  cntrlSearch = new ControlContainerTool(searchParamsContainerKey);

cntrlSearch.Control = pnlSearch;

pnlSearch.Parent = null;

Form.ribbonToolbarManager.Tools.Add(cntrlSearch);

ribbonGroup.Tools.AddTool(searchParamsContainerKey);

The flickering looks like the tablelayoutpanel is painted in the top left corner of the screen before placing itself into the ControlContainerTool, what am i doing wrong?

 

Any Help Appreciated!

 

Thanks

Carl.