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
Hi,
Cloud925 said: 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.
Maybe you could try events - BeforeToolDragBegin. AfterToolDragEnd or ultraToolbarsManager1_ToolbarModified() for the whole toolbar
Cloud925 said: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
Please let me know if you have any questions.
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
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.