Adding a Directed Connector To Palette programatically
Hi, I would like to know how to add a directed connector to a palette.
I'm using VB .net 2008
For orthogonal connector I use code as follows:
Dim m_connector As New OrthogonalConnector(PointF.Empty, New PointF(50, 50))
m_connector.HeadDecorator.DecoratorShape = DecoratorShape.Open45Arrow
m_connector.Name = "Orthogonal connector"
Dim palette As SymbolPalette = New SymbolPalette()
palette.AppendChild(m_connector)
PaletteGroupView1.LoadPalette(palette)
However, I cannot do the same for directed connector. I just want a simple directed line with an arrowhead.
Please assist
I'm using VB .net 2008
For orthogonal connector I use code as follows:
Dim m_connector As New OrthogonalConnector(PointF.Empty, New PointF(50, 50))
m_connector.HeadDecorator.DecoratorShape = DecoratorShape.Open45Arrow
m_connector.Name = "Orthogonal connector"
Dim palette As SymbolPalette = New SymbolPalette()
palette.AppendChild(m_connector)
PaletteGroupView1.LoadPalette(palette)
However, I cannot do the same for directed connector. I just want a simple directed line with an arrowhead.
Please assist
SIGN IN To post a reply.
4 Replies
AD
Administrator
Syncfusion Team
November 19, 2008 02:09 PM UTC
Actually i figured it out :P.
I used:
Dim m_connector2 As New LineConnector(PointF.Empty, New PointF(50, 50))
m_connector2.HeadDecorator.DecoratorShape = DecoratorShape.Open45Arrow
m_connector2.Name = "Directed connector"
However, I have a BIG problem.
I'm trying to use:
Dim m_connector3 As New OrthogonalConnector(PointF.Empty, New PointF(50, 50))
m_connector3.HeadingHead = CompassHeading.South
m_connector3.HeadingTail = CompassHeading.East
m_connector3.HeadDecorator.DecoratorShape = DecoratorShape.Open45Arrow
m_connector3.Name = "Orthogonal connector"
When i use the above code for an orthogonal connector and drag and drop onto diagram, If i try to link 2 nodes together, it does weird stuff. It goes in crazy direction when I release or move nodes around.
How do i properly use Headinghead and HeadingTail?
Basically I want to put an orthogonal connector on a pallet that goes, from first node, right/left first and then down/up to connect to another node, as opposed to default orthogonal connector that goes, from first node, down or up and then goes right/left to connect to another node
Please assist.
Thanks
I used:
Dim m_connector2 As New LineConnector(PointF.Empty, New PointF(50, 50))
m_connector2.HeadDecorator.DecoratorShape = DecoratorShape.Open45Arrow
m_connector2.Name = "Directed connector"
However, I have a BIG problem.
I'm trying to use:
Dim m_connector3 As New OrthogonalConnector(PointF.Empty, New PointF(50, 50))
m_connector3.HeadingHead = CompassHeading.South
m_connector3.HeadingTail = CompassHeading.East
m_connector3.HeadDecorator.DecoratorShape = DecoratorShape.Open45Arrow
m_connector3.Name = "Orthogonal connector"
When i use the above code for an orthogonal connector and drag and drop onto diagram, If i try to link 2 nodes together, it does weird stuff. It goes in crazy direction when I release or move nodes around.
How do i properly use Headinghead and HeadingTail?
Basically I want to put an orthogonal connector on a pallet that goes, from first node, right/left first and then down/up to connect to another node, as opposed to default orthogonal connector that goes, from first node, down or up and then goes right/left to connect to another node
Please assist.
Thanks
AD
Administrator
Syncfusion Team
November 20, 2008 05:52 AM UTC
Hi Ameel,
The Heading Head and Heading Tail define the connection time movements.
If you want the connectors to be in some pointed direction; we can set this at the time of declaration in the place of "ptStart and ptEnd".
The file that demonstrates this functionality is at the location:
****
The'>http://www.syncfusion.com/support/user/uploads/Test_VB_c17c27c5.zip">The Sample File
****
Happy Coding!
- Ajeet
The Heading Head and Heading Tail define the connection time movements.
If you want the connectors to be in some pointed direction; we can set this at the time of declaration in the place of "ptStart and ptEnd".
The file that demonstrates this functionality is at the location:
****
The'>http://www.syncfusion.com/support/user/uploads/Test_VB_c17c27c5.zip">The Sample File
****
Happy Coding!
- Ajeet
AD
Administrator
Syncfusion Team
November 20, 2008 05:55 AM UTC
Hi Ameel,
The corrected link re-posted here:
****
http://www.syncfusion.com/support/user/uploads/Test_VB_c17c27c5.zip
****
- Ajeet
The corrected link re-posted here:
****
http://www.syncfusion.com/support/user/uploads/Test_VB_c17c27c5.zip
****
- Ajeet
AD
Administrator
Syncfusion Team
November 20, 2008 12:37 PM UTC
Many thanks Ajeet.
As usual, good job ^__^
As usual, good job ^__^
SIGN IN To post a reply.
- 4 Replies
- 1 Participant
-
AD Administrator
- Nov 19, 2008 01:58 PM UTC
- Nov 20, 2008 12:37 PM UTC