Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Suite Pro
  New Posts New Posts RSS Feed - how to configure a connection in runtime
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

how to configure a connection in runtime

 Post Reply Post Reply
Author
Message
Rui View Drop Down
Newbie
Newbie


Joined: 15 December 2017
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rui Quote  Post ReplyReply Direct Link To This Post Topic: how to configure a connection in runtime
    Posted: 15 December 2017 at 11:09am
How can i in run time configure a connection line between two nodes with a broken line, or a line that make 90ยบ degress ?
At design time it's easy to broke the line and make how we want, but i need to make it at run time.
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 19 December 2017 at 12:29pm
Set pConnection = Page.Connections.Connection(0)
pConnection.Style = xtpFlowGraphConnectorCurvedArrow
Back to Top
Rui View Drop Down
Newbie
Newbie


Joined: 15 December 2017
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rui Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2017 at 2:34pm
Maybe i didn't explain very well, I know how to make a connection in run time what i don't know is to make a connection like line like (see image) between node "test2" and "test3" or "test2 and "test4". At design time it's easy to change but in run time how i can do it like that ? It's a connection line but actually are two lines.



Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 20 December 2017 at 3:42pm
For testing I have added my code in SelectAll menu item handler. So when I press in run time SelectAll then appropriate connection line change style to CurvedArrow.
You can save pointer to desired connection or search it by name, or get it by ID and then set new style.
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 21 December 2017 at 7:43pm


Dim connType As FlowGraphConnectorType

Private Sub mnuSelectAll_Click()
    'FlowGraph.SelectAll
    
    connType = connType + 1
    
    If connType > xtpFlowGraphConnectorElbowDoubleArrow Then
        connType = xtpFlowGraphConnectorStraight
    End If
    
    Dim Page As FlowGraphPage
    Set Page = FlowGraph.ActivePage
    
    Dim pConnection As FlowGraphConnection
    Dim i As Integer
    For i = 0 To Page.Connections.Count - 1
        
        Set pConnection = Page.Connections.Connection(i)
        pConnection.Style = connType
    Next i
End Sub

Back to Top
Rui View Drop Down
Newbie
Newbie


Joined: 15 December 2017
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rui Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2017 at 1:13pm
It was really useful your answer, thank you, but i have one more question.
After i change a straight line to a elbow line in run time how can i access in code to the new elbow line properties ?
Back to Top
olebed View Drop Down
Admin Group
Admin Group


Joined: 01 July 2014
Location: Ukraine
Status: Offline
Points: 841
Post Options Post Options   Thanks (0) Thanks(0)   Quote olebed Quote  Post ReplyReply Direct Link To This Post Posted: 23 December 2017 at 1:39pm
Object of line still the same, you just change its style. So you can get it in the same way as before.

If you want to break straight line by code (not with mouse) - It isn't possible in ActiveX version.
Back to Top
Rui View Drop Down
Newbie
Newbie


Joined: 15 December 2017
Status: Offline
Points: 7
Post Options Post Options   Thanks (0) Thanks(0)   Quote Rui Quote  Post ReplyReply Direct Link To This Post Posted: 27 December 2017 at 10:53am
Ok, thank you
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.