Nevron Forum
Back
Login
Register
Login
Register
Home
»
Nevron Open Vision for NET
»
NOV Diagram for .NET
»
How to Modify Menu of NDrawingViewWithCommandBarsControl
How to Modify Menu of NDrawingViewWithCommandBarsControl
Post Reply
How to Modify Menu of NDrawingViewWithCommandBarsControl
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
Goto Topics Forum
Author
Message
Ashley Davy
Ashley Davy
posted 4 Years Ago
ANSWER
Topic Details
Group: Forum Members
Posts: 36,
Visits: 119
I am migrating from Diagram .NET to Diagram NOV. The code below is what I used to customize the menu of Diagram .NET. I want to customize the menu the same way for Diagram NOV NDrawingViewWithCommandBarsControl. I have looked at the examples but I cannot figure out how to access the menu and toolbars. Can you provide me with an equivalent example based on the code below to customize the NDrawingViewWithCommandBarsControl.
Thanks,
Ashley
NDiagramCommandBarsManager1.Toolbars(0).Hide()
NDiagramCommandBarsManager1.Toolbars(1).Hide()
NDiagramCommandBarsManager1.Toolbars(2).Hide()
NDiagramCommandBarsManager1.Toolbars(3).Hide()
NDiagramCommandBarsManager1.Toolbars(4).Hide()
NDiagramCommandBarsManager1.Toolbars(5).Hide()
NDiagramCommandBarsManager1.Toolbars(6).Hide()
NDiagramCommandBarsManager1.Toolbars(7).Hide()
NDiagramCommandBarsManager1.Toolbars(3).Show()
NDiagramCommandBarsManager1.Toolbars(3).Moveable = False
NDiagramCommandBarsManager1.Toolbars(3).AllowReset = False
NDiagramCommandBarsManager1.Toolbars(3).HasPendantCommand = False
ColHold = New Collection
For Each X As Nevron.UI.WinForm.Controls.NCommand In NDiagramCommandBarsManager1.Toolbars(3).Commands
If X.ToString.ToLower = "start arrowhead style..." Then
ColHold.Add(X)
End If
If X.ToString.ToLower = "end arrowhead style..." Then
ColHold.Add(X)
End If
If X.ToString.ToLower = "bridge style..." Then
ColHold.Add(X)
End If
If X.ToString.ToLower = "interactivity style..." Then
ColHold.Add(X)
End If
Next
For Each X As Nevron.UI.WinForm.Controls.NCommand In ColHold
NDiagramCommandBarsManager1.Toolbars(3).Commands.Remove(X)
Next
NDiagramCommandBarsManager1.Toolbars(6).Show()
NDiagramCommandBarsManager1.Toolbars(6).Moveable = False
NDiagramCommandBarsManager1.Toolbars(6).AllowReset = False
NDiagramCommandBarsManager1.Toolbars(6).HasPendantCommand = False
ColHold = New Collection
For Each X As Nevron.UI.WinForm.Controls.NCommand In NDiagramCommandBarsManager1.Toolbars(6).Commands
'If X.ToString.ToLower = "connector tool" Then
' ColHold.Add(X)
'End If
Next
For Each X As Nevron.UI.WinForm.Controls.NCommand In ColHold
NDiagramCommandBarsManager1.Toolbars(6).Commands.Remove(X)
Next
NDiagramCommandBarsManager1.Toolbars(4).Show()
NDiagramCommandBarsManager1.Toolbars(4).Moveable = False
NDiagramCommandBarsManager1.Toolbars(4).AllowReset = False
NDiagramCommandBarsManager1.Toolbars(4).HasPendantCommand = False
ColHold = New Collection
For Each X As Nevron.UI.WinForm.Controls.NCommand In NDiagramCommandBarsManager1.Toolbars(4).Commands
If X.ToString.ToLower = "connector tool" Then
ColHold.Add(X)
End If
Next
For Each X As Nevron.UI.WinForm.Controls.NCommand In ColHold
NDiagramCommandBarsManager1.Toolbars(4).Commands.Remove(X)
Next
NDiagramCommandBarsManager1.Toolbars(2).Show()
NDiagramCommandBarsManager1.Toolbars(2).Moveable = False
NDiagramCommandBarsManager1.Toolbars(2).AllowReset = False
NDiagramCommandBarsManager1.Toolbars(2).HasPendantCommand = False
ColHold = New Collection
For Each X As Nevron.UI.WinForm.Controls.NCommand In NDiagramCommandBarsManager1.Toolbars(2).Commands
If X.ToString.ToLower = "pan and zoom" Then
ColHold.Add(X)
End If
If X.ToString.ToLower = "property browser" Then
ColHold.Add(X)
End If
If X.ToString.ToLower = "library browser" Then
ColHold.Add(X)
End If
If X.ToString.ToLower = "status bar" Then
ColHold.Add(X)
End If
Next
For Each X As Nevron.UI.WinForm.Controls.NCommand In ColHold
NDiagramCommandBarsManager1.Toolbars(2).Commands.Remove(X)
Next
NDiagramCommandBarsManager1.Toolbars(4).RowIndex = 1
NDiagramCommandBarsManager1.Toolbars(2).RowIndex = 1
NDiagramCommandBarsManager1.Toolbars(3).RowIndex = 2
NDiagramCommandBarsManager1.Toolbars(6).RowIndex = 2
Me.NDrawingView1.Dock = DockStyle.Fill
Reply
Like
0
Reply
Nevron Support
Nevron Support
posted 4 Years Ago
ANSWER
Post Details
Group: Administrators
Posts: 3.1K,
Visits: 4.2K
Hello,
Please take a look at the following documentation topic for information how to customize and remove commands from the NOV Diagram command bar's UI:
NOV Diagram Command Bars
If you decide to use the ribbon, you can also use the WinForms designer to hide commands or ribbon tabs:
NOV Diagram Ribbon
Let us know if you have any questions.
Best Regards,
Nevron Support Team
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
How to Modify Menu of NDrawingViewWithCommandBarsControl
Ashley Davy
-
4 Years Ago
Hello, Please take a look at the following documentation topic for...
Nevron Support
-
4 Years Ago
How do I access the ToolBarBuilders and the MenuDropDownBuilders from...
Ashley Davy
-
4 Years Ago
Hello, If you are using the WinForms designer and the...
Nevron Support
-
4 Years Ago
Post Reply
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search