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.
Unfortunately, activation email could not send to your email. Please try again.

XPTaskBar Display Problems

Thread ID:

Created:

Updated:

Platform:

Replies:

2758 Feb 12,2003 01:55 PM Feb 14,2003 12:57 PM Windows Forms 2
loading
Tags: Tools
Nik Vale
Asked On February 12, 2003 01:55 PM

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 07:12 AM

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 12:57 PM

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

CONFIRMATION

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.

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.

;