Notifications
Clear all
[Closed] Multiple Ribbon
May 26, 2015 5:46 pm
Do you know we can have multiple Ribbons at the same time?
dotNet.loadAssembly @"WindowsFormsIntegration.dll"
fn CreateRibbon =
(
Ribbon = dotnetobject "WPFCustomControls.MaxRibbonControl"
Tab = dotnetobject "WPFCustomControls.MaxRibbonTab"
Panel = dotnetobject "WPFCustomControls.MaxModelingRibbonPanel"
Src = dotnetobject "Autodesk.Windows.RibbonPanelSource"
Ribbon.Tabs.add Tab
Tab.Panels.add Panel
Panel.source = Src
Lbl = dotnetobject "WPFCustomControls.MaxRibbonLabel"
Lbl.height = 100
Lbl.text = "I'm Ribbon Label!"
Src.items.add Lbl
Ribbon
)
for Rol in #(LeftRibbonRol,RightRibbonRol,TopRibbonRol,BottomRibbonRol,FloatRibbonRol) where Rol!= undefined do
(
cui.UnRegisterDialogBar Rol
destroydialog Rol
)
rollout LeftRibbonRol "" width:100 height:10000
(
dotNetControl ElementHost "Integration.ElementHost" pos:[0,0] width:LeftRibbonRol.width height:LeftRibbonRol.height
on LeftRibbonRol open do
(
ElementHost.child = CreateRibbon()
)
)
createdialog LeftRibbonRol
cui.RegisterDialogBar LeftRibbonRol style:#(#cui_dock_all) minSize:1 maxSize:-1
cui.DockDialogBar LeftRibbonRol #cui_dock_Left
rollout RightRibbonRol "" width:100 height:10000
(
dotNetControl ElementHost "Integration.ElementHost" pos:[0,0] width:RightRibbonRol.width height:RightRibbonRol.height
on RightRibbonRol open do
(
ElementHost.child = CreateRibbon()
)
)
createdialog RightRibbonRol
cui.RegisterDialogBar RightRibbonRol style:#(#cui_dock_all) minSize:1 maxSize:-1
cui.DockDialogBar RightRibbonRol #cui_dock_Right
rollout TopRibbonRol "" width:10000 height:100
(
dotNetControl ElementHost "Integration.ElementHost" pos:[0,0] width:TopRibbonRol.width height:TopRibbonRol.height
on TopRibbonRol open do
(
ElementHost.child = CreateRibbon()
)
)
createdialog TopRibbonRol
cui.RegisterDialogBar TopRibbonRol style:#(#cui_dock_all) minSize:1 maxSize:-1
cui.DockDialogBar TopRibbonRol #cui_dock_Top
rollout BottomRibbonRol "" width:10000 height:100
(
dotNetControl ElementHost "Integration.ElementHost" pos:[0,0] width:BottomRibbonRol.width height:BottomRibbonRol.height
on BottomRibbonRol open do
(
ElementHost.child = CreateRibbon()
)
)
createdialog BottomRibbonRol
cui.RegisterDialogBar BottomRibbonRol style:#(#cui_dock_all) minSize:1 maxSize:-1
cui.DockDialogBar BottomRibbonRol #cui_dock_Bottom
rollout FloatRibbonRol "" width:100 height:100
(
dotNetControl ElementHost "Integration.ElementHost" pos:[0,0] width:FloatRibbonRol.width height:FloatRibbonRol.height
on FloatRibbonRol open do
(
ElementHost.child = CreateRibbon()
)
on FloatRibbonRol resized Val do
(
ElementHost.width = FloatRibbonRol.width
ElementHost.height = FloatRibbonRol.height
)
)
createdialog FloatRibbonRol style:#(#style_titlebar,#style_sysmenu,#style_resizing,#style_maximizebox,#style_minimizebox)