Posted 18 years ago
by Gianni Gardini
- Italy
Version: 2.0.0072
In WindowsApplication1, create a Toolbar "Custom 1" with some checkable Commands, all with the same CheckGroupName and save layout to xml.
Case 1
In WindowsApplication2, load the toolbar "Custom 1" in a barManager.
It works: if you click on a menuItem, it appears as checked
Case 2
In WindowsApplication2, create a Toolbar "Custom 1" and then merge the toolbar "Custom 1" from WindowsApplication1.
It doesn't work: items are not checkable, but I saved then checkable.
You can try that in your TestApplication, class BarForm.cs.
- Create a Toolbar "Custom 1" and add "Renderer" Command
- Change CommandLink to MergeAction = Append
- Save to file as "C:\save.xml".
- Add the following code to Load event:When you run the application, in the "Options" toolbar you'll have two Renderer list, one checkable and one not checkable.
In WindowsApplication1, create a Toolbar "Custom 1" with some checkable Commands, all with the same CheckGroupName and save layout to xml.
Case 1
In WindowsApplication2, load the toolbar "Custom 1" in a barManager.
It works: if you click on a menuItem, it appears as checked
Case 2
In WindowsApplication2, create a Toolbar "Custom 1" and then merge the toolbar "Custom 1" from WindowsApplication1.
It doesn't work: items are not checkable, but I saved then checkable.
You can try that in your TestApplication, class BarForm.cs.
- Create a Toolbar "Custom 1" and add "Renderer" Command
- Change CommandLink to MergeAction = Append
- Save to file as "C:\save.xml".
- Add the following code to Load event:
private void BarForm_Load(object sender, System.EventArgs e)
{
BarManager bm = new BarManager();
bm.HostContainerControl = new Form();
bm.LoadBarLayoutFromFile(@"C:\save.xml");
BarManager.Merge(bm.DockableToolBars["Custom 1"], barManager.DockableToolBars["Options"], false);
}