Hi there,
is it possible to use the Drag&Drop Funcion with the UltraToolBarsManager? First i did it with the UltraTree using the DoDragDrop-Function but this one does not exist on UltraToolBarsManager.
What must i do to use Drag&Drop with the UltraToolBarsManager?
regards
Cloud
Hello Could,
I`m not sure what you mean with drag and drop functionality in UltraToolbarManager, but if you want to move the tools from one UltraToolbarManager to another UltraToolbarManager with drag and drop, then maybe you could used the code:
private void ultraToolbarsManager1_ToolbarModified(object sender, Infragistics.Win.UltraWinToolbars.ToolbarModifiedEventArgs e) { if (e.ToolbarChangeType == ToolbarChangeType.EndDrag) { UltraToolbar ut = null; if (((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars.Exists(e.Toolbar.Key)) //if (((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Key == e.Toolbar.Key) { ut = ((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars[e.Toolbar.Key]; } else { ut = ((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars.AddToolbar(e.Toolbar.Key); } ut.Visible = true; ut.DockedPosition = DockedPosition.Top; while (ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Tools.Count > 0) { ToolBase tb = ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Tools[0]; ultraToolbarsManager1.Tools.Remove(tb); ultraToolbarsManager1.Toolbars[e.Toolbar.Index].Tools.Remove(tb); ((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Tools.Add(tb); ((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars[ut.Key].Tools.AddTool(tb.Key); } if (ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Tools.Count == 0) { ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Visible = false; } } }
private void ultraToolbarsManager1_ToolbarModified(object sender, Infragistics.Win.UltraWinToolbars.ToolbarModifiedEventArgs e)
{
if (e.ToolbarChangeType == ToolbarChangeType.EndDrag)
UltraToolbar ut = null;
if (((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars.Exists(e.Toolbar.Key))
//if (((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Key == e.Toolbar.Key)
ut = ((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars[e.Toolbar.Key];
}
else
ut = ((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars.AddToolbar(e.Toolbar.Key);
ut.Visible = true;
ut.DockedPosition = DockedPosition.Top;
while (ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Tools.Count > 0)
ToolBase tb = ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Tools[0];
ultraToolbarsManager1.Tools.Remove(tb);
ultraToolbarsManager1.Toolbars[e.Toolbar.Index].Tools.Remove(tb);
((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Tools.Add(tb);
((Form2)this.ActiveMdiChild).ultraToolbarsManager1.Toolbars[ut.Key].Tools.AddTool(tb.Key);
if (ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Tools.Count == 0)
ultraToolbarsManager1.Toolbars[e.Toolbar.Key].Visible = false;
Please take a look at the attached sample and video file for more details and let me know if you have any questions or if you think that I misunderstood your question.
Regards
thanks for your reply.
But unfortunately i do not really understand what this code-snipped is doing...
I want to drag a buttontool from a ribbon in the ultratoolbarsmanager to an explorerbar. The buttontool should then be a button in the ExplorerbarGroup.
I just need to know how i can start the drag and drop event from the toolbarsmanager and where i have to store the buttontool from there.
Hope u understand
best regards
that´s not the problem. i just need to know how can i do something like the DoDragDrop-Function on the ultratoolbarsmanager where i can save a bunch of data that i can use in the dragdrop-event on the explorerbar...
the question is really simple:
does the ultratoolbarsmanager have a simple way to start the drag&drop with a button tool?
Hello Cloud,
At that moment we didn`t implement drag & drop functionality in our UltraToolbarManager. If you want to achieve such behavior, you could handle few events (see the list below) and implement there your custom code. The events are:
ultraToolbarsManager1_MouseEnterElement()
ultraToolbarsManager1_MouseLeaveElement()
ultraToolbarsManager1_ToolbarModified()
if you want to use both events:
ultraToolbarsManager1_BeforeToolDragBegin()
ultraToolbarsManager1_AfterToolDragEnd()
please note that they firing when this Customize window is opened. The 'Customize' feature lets you organize the toolbars to suit your special needs like positioning certain tools at certain visible indices. You could find more information about these events in our online documentation
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Infragistics2.Win.UltraWinToolbars.v11.1~Infragistics.Win.UltraWinToolbars.UltraToolbarsManager~BeforeToolDragBegin_EV.html
http://help.infragistics.com/Help/NetAdvantage/WinForms/2011.1/CLR2.0/html/Infragistics2.Win.UltraWinToolbars.v11.1~Infragistics.Win.UltraWinToolbars.UltraToolbarsManager~AfterToolDragEnd_EV.html
Let me know if you have any questions.
Have you been able to resolve your issue ? If you still have any concerns or questions I will be glad to help. If you need any additional assistance don’t hesitate to ask.
actually i did not solve my probem. i do not understand how to solve this so i will not do it with drag&drop