Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Differentiate between different boxes (Read 1423 times)
Christie
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Dec 1st, 2006
Differentiate between different boxes
Dec 1st, 2006 at 7:48am
Print Post  
I am using FlowChart.Net in my VB.Net application.  Users will be able to create multiple boxes, limited to only four shapes during runtime:  My questions are:
I want to assign different contextmenu's to the different type of boxes.  Is there a way to distinguise between boxes of different shapes??  I have tried the getType method but without success.
I have even tried the following:
    Dim iBoxType As Integer
    iBoxType = Me.SchedFChart.BoxStyle
but the above code returns a value of 2 no matter what the shape of the box.  Some boxes will be roundedrectangle and some ConeUp etc.

Is there a way to keep track of different components in the flowchart, are they for example indexed?  I will need to assign different properties to the boxes created by the user at runtime and will need to keep track of individual boxes even when moved by the user.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Differentiate between different boxes
Reply #1 - Dec 1st, 2006 at 8:32am
Print Post  
Me.SchedFChart.BoxStyle is the default style assigned to newly created boxes. Check the Style and Shape properties of the Box class if you need to know the shape of a specific box.

All objects in the chart are accessible through the FlowChart.Objects collection. In addition there are strongly types collections that will let you access only specific object types, e.g. FlowChart.Boxes, FlowChart.Arrows, etc.

When a user creates a box, the BoxCreated event will be raised and the BoxEventArgs.Box will let you access the newly created box.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Christie
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 16
Joined: Dec 1st, 2006
Re: Differentiate between different boxes
Reply #2 - Dec 3rd, 2006 at 5:56am
Print Post  
Thanks for that...I am working through it at the moment...
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint