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.

Copy a xpTaskBarBox object

Thread ID:

Created:

Updated:

Platform:

Replies:

7012 Sep 9,2003 03:26 PM Sep 12,2003 09:32 AM Windows Forms 7
loading
Tags: Tools
keith
Asked On September 9, 2003 03:26 PM

In my app, there a xpTaskBar and several xpTaskBarBox boxes inside the bar. Each box has a panel control which contains variable controls in the panel. Do you know how to make a copy of the boxes including panel and its controls? I want to do it because I would like to add a box which is a copy of the existed one into the bar at run time. Thanks

Arun Srinivasan [Syncfusion]
Replied On September 9, 2003 06:25 PM

Hi Keith, The XPTaskBarBox does not implement the ICloneable interface and hence cloning it is not an option. But this is standard as most controls, (example Windows Forms TextBox control) do not implement the ICloneable interface. So what you could do is use the reference like you had in one of your earlier postings in the forums like: xpTaskBar1.Controls.Add(xpTaskBarBox1); xpTaskBar1.Controls.Add(xpTaskBarBox2); Arun

Administrator [Syncfusion]
Replied On September 9, 2003 07:44 PM

Hi Keith, I have modified the existing XPTaskBarDemo sample to implement a poor workaround. Please take a look into the code attached and let me know if this what you are looking for. Regards, Guru Patwal.

keith
Replied On September 10, 2003 09:03 AM

The codes you provided works just fine. It is great if you can provide some codes that allow users drag a box and move to another position in the bar. One question is to make a copy of one of boxes then add it into the bar. The difficulty is that I don't how many controls and what kind of them in a box to be copied from.

Administrator [Syncfusion]
Replied On September 11, 2003 12:49 PM

Hi Keith, Adding the drag and drop feature to a XPTaskBarBox item has been considered as a 'feature request' (QA# 281). We will do our very best to implement this feature at the earliest and include it in our future releases. Thanks for your patience. Regards, Guru Patwal.

keith
Replied On September 11, 2003 04:17 PM

how to make a copy of a box inside a bar then add it into the bar? thanks Keith

Ramesh Praveen [Syncfusion]
Replied On September 12, 2003 08:05 AM

Keith, Controls in the .Net framework do not provide any support for Copying (Cloning). That's true with the XPTaskBarBoxes too. The cloning metaphor is achieved in the framework by creating a class that implements all the functionality and then creating multiple instances of that class, which would act like clones. In your case, you could have a derived XPTaskBarBox, that will initialize itself with the Panels and such and also listen to the events generated and perform the appropriate action. You could then create different instances of this type (which will look and act like Clones). Hopefully, I am clear here. Regards, Praveen Ramesh

keith
Replied On September 12, 2003 09:32 AM

You are right. There is no way to copy a box in a bar.. Thanks Keith

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.

;