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.

Sizing XPTaskBoxes inside an XPTaskBar?

Thread ID:

Created:

Updated:

Platform:

Replies:

6487 Aug 13,2003 08:54 PM Sep 25,2003 07:31 AM Windows Forms 9
loading
Tags: Tools
Sue Harris
Asked On August 13, 2003 08:54 PM

Hi, I'm dynamically adding labels to a panel inside a XPTaskBox, and I would like to set the width of the task box to show the entire length of the label. I've been doing this by setting the XPTaskBar to the required width, but keeping the panel the task bar exists on at the desired width, causing scroll bars to pop up when required. However, I'm experiencing some problems with the sizing / positioning of the task bar/boxes. (I feel it may be imporant to note that I have a 10 pixel docking padding). Sometimes (seems to occur most often when there are only two items in the item, or there are sufficient items in the list that a vertical scrollbar would be required), the XPTaskBar sizes too small (smaller than the width I've set), when I click on one of the collapse buttons on the task boxes (or do a resize), the task boxes suddenly jump to the correct size. I haven't been able to create an sample example that consistantly displays this problems, so I can't really provide any code, but would appreciate any suggestions that could be made. Also, is there any preferred event for me to catch so I can resize the height of my panel when the XPTaskBoxes collapse or expand? Thanks, Sue

Ramesh Praveen [Syncfusion]
Replied On August 14, 2003 02:33 PM

Sue, How do you change the width of the xptaskbar? Via the Size property? Is the xptaskbar also set to Dock/Anchor, etc with the parent Panel? The XPTaskBarbox has a AfterAnimation event that will be called after expand/collapse. Regards, Praveen

Sue Harris
Replied On September 18, 2003 06:14 PM

I've finally managed to reproduce this problem in a sample. It seems to be related to AutoSize (which keeps setting itself to true for the XPTaskBarBox), and scrollbars (which I'm handling myself). If you run the sample, and scroll over you can see that the taskbarbox isn't initially sizing all the way to the right as it should, but as soon as you minimize one of the task bars, it corrects itself. Can you help me solve this? Thanks, Sue

Administrator [Syncfusion]
Replied On September 19, 2003 12:50 PM

Hi Sue, Thanks for the sample. We could see the problem that you are facing. You could overcome this problem by handling the SizeChanged event of the xpTaskBar1 in the TaskBarBoxPanels.cs file as follows: private void xpTaskBar1_SizeChanged(object sender, System.EventArgs e) { /* The normal layout performed for the boxes in the XPTaskBar's Layout event is not good enough in this case, so work around it by forcing a layout here.*/ this.xpTaskBar1.PerformLayout(); } Please let me know if this helps. Regards, Guru Patwal.

Sue Harris
Replied On September 21, 2003 02:54 PM

Hi Guru, Your sample code fixed the problem with the size being incorrect, the only other (small) problem, is the first time I collapse one of the boxes, the autoscrollposition of my panel is jumping back to the start, which it doesn't do in subsequent collapse/expand operations. Thanks, Sue

Administrator [Syncfusion]
Replied On September 22, 2003 03:02 PM

Hi Sue, Please let me know the steps to reproduce this behavior in the sample you have sent or in our demo sample so that we can investigate it further. Thanks for your cooperation. Regards, Guru Patwal.

Sue Harris
Replied On September 24, 2003 04:20 PM

Hi Guru, If you take my original sample file, (you don't need to add the change you suggested), scroll right until the expand/collapse buttons on the task bar boxes are in view, and collapse one of the boxes, the scroll position jumps back to the left. If you then scroll back to the right, you can expand and collapse the boxes, without affecting the scroll position. Regards, Sue

Administrator [Syncfusion]
Replied On September 24, 2003 07:05 PM

Hi Sue, I have tested for this issue using your sample in our latest release Essential Suite 1.6.1.6. The scrollbar jumped to the left everytime (not just the first time) I expanded/collapsed a XPTaskBarBox. Please let me know if you are experiencing problems due to this behavior of the scollbar. Also, if you are using an earlier version of Essential Suite, please open an incident in DirectTrac and place a request for the latest version. We will send you the download information for the latest release of Essential Suite. Thanks for your cooperation. Regards, Guru Patwal Syncfusion Inc.

Sue Harris
Replied On September 24, 2003 11:30 PM

Hi Guru, Strangely, I'm also using 1.6.1.6, but the scrollbar only jumps left the first time I collapse a task bar box (for each box). It's not a huge issue, just vaguely annoying that it isn't consistant. Thanks for your assistance. Regards, Sue

Administrator [Syncfusion]
Replied On September 25, 2003 07:31 AM

Hi Sue, After having further investigated this issue, I could observe that the scrollbar jumps to the left only when a new XPTaskBarBox gains focus. In other words, for the first time when you scroll to the right and collapse a XPTaskBarBox, the scrollbar jumps back to the left. Now when you scroll back to the right and expand/collapse the same XPTaskBarBox the scrollbar stays put. But if you collapse/expand some other XPTaskBarBox scrollbar will jump to the left again. After having consulted the Essential Suite development team on this issue, I would like to inform you that this is a natural behavior of the .NET wherein it makes sure that the control's leftmost portion is visible whenever it gains focus. Hope this helps. Regards, Guru Patwal Syncfusion Inc.

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.

;