Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Larger flow control than form? (Read 2499 times)
Mark_Wills
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 27
Joined: Mar 6th, 2006
Larger flow control than form?
Mar 6th, 2006 at 12:49pm
Print Post  
Hi there,

Can anyone suggest the best set of settings for the flow chart and form such that I can have a flow chart of size, say, 2000 by 2000 and my form have simple scroll bars at side and bottom?

I cant seem to get the combination of settings correct - I can get the form (an MDI parent, with the flow control on the MDI parent form (seems to work fine)) and I seem to be able to scroll around the flow chart using the scroll bars of the form, but, I find that I cant 'draw' a box in some areas (get the round no entry mouse icon) and other areas I can draw a box... Can anyone suggest the best method?

Basically, I want a big 'canvas' (the flow chart control) upon which users draw - they can scroll around to use the full size of the canvas, and the overview control will allow them to window in quickly on area, but so far strange things are happening!

Just downloaded today, but very impressed - a bit overwhelmed though at the moment with huge breadth of this component suite - very impressive indeed.

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Larger flow control than form?
Reply #1 - Mar 6th, 2006 at 1:08pm
Print Post  
Hello Mark,

By default the document area is as big as A4 page and the control does not allow users to draw boxes outside that area. Assign a larger rectangle to the DocExtents property to have a large initial canvas size.

If you set a FlowChart.ExteriorBrush you will be able to see what area is outside the DocExtents (hence drawing is disabled there).

You could also change the values of the AutoSizeDoc and RestrictObjectsToDoc properties to make the canvas area grow automatically if users draws outside the current DocExtents.

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


I love YaBB 1G - SP1!

Posts: 27
Joined: Mar 6th, 2006
Re: Larger flow control than form? / context menu?
Reply #2 - Mar 6th, 2006 at 3:12pm
Print Post  
Stoyan,

Aha! Many thanks! It makes sense now! My next question was going to be "Why can't I draw on some areas of the document?", but now I understand!

I am using the FlowChart document in it's default form, as it satisfies my needs nicely.

Do you have any idea how I can add a context menu to a box after it has been drawn on the document? I looked in the BoxCreated event, and then looked at e.Box properties, but there is no property to hold a context menu.

Basically, in my app, the boxes represent procedures, the title of the procedure will be displayed on the box, and when clicked or double clicked, a code window will open allowing code associated with that procedure (we would call them subroutines but this particular micro-controller manufactuer calls them procedures) to be entered.

I would like a simple context to open when a box is right clicked, allowing the type of the box to be changed - one style could represent a procedure (subroutine), one style a function (returns a value) and another a task (runs on a different thread), for example... Any help greatly appreciated.

If you feel this should be posted as a seperate thread, please feel free to edit as appropriate.

Many thanks once again for your reply.

Regards

Mark Wills
  
Back to top
 
IP Logged
 
Mark_Wills
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 27
Joined: Mar 6th, 2006
Re: Larger flow control than form?
Reply #3 - Mar 6th, 2006 at 3:34pm
Print Post  
Ah! Found it! The BoxMouseArgs class exposes a Button property, so I can see which mouse button was clicked - if it's a right button, I can open a context menu at the current mouse position Smiley

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Larger flow control than form?
Reply #4 - Mar 6th, 2006 at 6:10pm
Print Post  
Yep, that's how the FlowChart.NET sample projects display context menus, so I guess that's the 'official' method  Smiley

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint