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.
ASArun Srinivasan Syncfusion Team September 9, 2003 05:25 PM
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:
ADAdministrator Syncfusion Team September 9, 2003 06:44 PM
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.
KEkeith September 10, 2003 08: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.
ADAdministrator Syncfusion Team September 11, 2003 11:49 AM
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.
KEkeith September 11, 2003 03:17 PM
how to make a copy of a box inside a bar then add it into the bar?
RPRamesh Praveen Syncfusion Team September 12, 2003 07:05 AM
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.
KEkeith September 12, 2003 08:32 AM
You are right. There is no way to copy a box
in a bar..