Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Beginners question (Read 1689 times)
Laser
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 5
Joined: Nov 27th, 2007
Beginners question
Dec 18th, 2007 at 4:36am
Print Post  
Hi
I´m starting to learn FlowChartX from the very bottom, and naturally I have a ton of questions to post on this forum.
I´m doing my application on the old Visual Basic 6, and I´m not very good in OOP, so, forgive my ignorance if I´m being too basic on my questions.

I´m going to start with the following problem:

I have programmatically created two boxes.
To do it, I have done it like this:

Private Sub Command1_Click()
    FlowChart1.CreateBox 100, 100, 40, 60
    FlowChart1.CreateBox 200, 100, 40, 60
End Sub

After clicking the button, two boxes are created.

Now, I want to connect the two boxes with an arrow.

I know that the method to do this is something like:

FlowChart1.CreateArrow source box, destination box

Now, how do I refer to the source and destination boxes?
I mean, I have two boxes instantiated, but I have no ideia on how do I refer to them programmatically.
The same happens if, for example, I want to change the color of one of the boxes. How programmatically do I refer to a specific box, or arrow, or anything else that has been instantiated.
There should be a unique identifier for each object somewhere, but where, and how do I gain access to it?

Thanks in advance.

Francisco S.

  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Beginners question
Reply #1 - Dec 18th, 2007 at 6:26am
Print Post  
Hi,

You must assign the CreateBox result to a variable, e.g.

dim srcBox as Box
dim destBox as Box
set srcBox = FlowChart1.CreateBox(100, 100, 40, 60)
set destBox = FlowChart1.CreateBox(200, 100, 40, 60)
FlowChart1.CreateArrow srcBox, destBox

You could access the boxes though the FlowChart.Boxes collection as well.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint