We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

XPTaskBar Display Problems

Thread ID:





2758 Feb 12,2003 06:55 PM UTC Feb 14,2003 05:57 PM UTC WinForms 2
Tags: Tools
Nik Vale
Asked On February 12, 2003 06:55 PM UTC

Hi, I am having some display problems with the XPTaskBar. I know that the problems are caused by what I am trying to do but maybe you can suggest a better way to acheive the same result. Basically I have three XPTaskBarBox which fill the form. What I would like to happen is when the top or bottom XPTaskBarBox is collapsed the middle one is made larger so that the XPTaskBar still fills the form. The attached code achieves this, however there is some flickering during the collapse / expand of the top or bottom XPTaskBarBox. Thanks in advance, Nik

Ramesh Praveen [Syncfusion]
Replied On February 14, 2003 12:12 PM UTC

Nik, The flicker happens because the child Panel gets sized first and then positioned. To avoid this try this approach: // Use this class instead of the XPTaskBar and set the childPanel (which flickers) field in the form's constructor. public class MyTaskBar : Syncfusion.Windows.Forms.Tools.XPTaskBar { public Panel childPanel = null; protected override void OnLayout(LayoutEventArgs levent) { // Suspend child Panel layout until layout is done. if(childPanel != null) childPanel.SuspendLayout(); base.OnLayout(levent); if(childPanel != null) childPanel.ResumeLayout(true); } } // Use this custom panel. Another way to avoid flicker. public class MyPanel : Panel { public MyPanel() { // To prevent automatic redraw when the control gets resized (this reduces flicker). this.SetStyle(ControlStyles.ResizeRedraw, false); } }

Nik Vale
Replied On February 14, 2003 05:57 PM UTC

Praveen, Thanks for your suggestions. I tried them out and they helped a little with the flickering. Calling SuspendLayout() on the child panels helps, however the XPTaskBarBox still get's resized even if I call SuspendLayout() on that too. The flickering happens when the XPTaskBarBox's Size property is updated, and also when "LayoutContainer()" is called on the "flowLayout" object. Thanks in advance, Nik


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon