Page Index Toggle Pages: 1 Send TopicPrint
Hot Topic (More than 10 Replies) Move Arrows and selecting objects with RMB (Read 6323 times)
Akira
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Nov 13th, 2006
Move Arrows and selecting objects with RMB
Nov 21st, 2006 at 9:43am
Print Post  
I've two questions:
Arrows:
I would like to give the option to move arrows as a whole and not only via control points. Is it possible to do that in FlowChart.Net, and when so, how?

Object selection with RMB(right mouse button):
In some cases I would like to select objects not only with the LMB but also with the RMB - here again -  is it possible to do that in FlowChart.Net, and when so, how?

Thx in advance
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Move Arrows and selecting objects with RMB
Reply #1 - Nov 21st, 2006 at 12:08pm
Print Post  
It might be possible by automatically selecting the arrow nodes first. If moving the nodes too is ok for you, I can create some example to show how to do that.

At this time the control uses only the left button for user interaction. We can add a new property to the FlowChart that will let you use the right button too.

Stoyan
  
Back to top
 
IP Logged
 
Akira
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Nov 13th, 2006
Re: Move Arrows and selecting objects with RMB
Reply #2 - Nov 21st, 2006 at 2:00pm
Print Post  
Concerning the arrows: I would really appreciate to have a sample from you which shows  how to do it.

A property for the RMB issue would be great, as well.

Thx

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Move Arrows and selecting objects with RMB
Reply #3 - Nov 22nd, 2006 at 5:58am
Print Post  
Hi,

Here is how that can be done by selecting the boxes and moving the multiple-selection:

Code
Select All
private void Form1_Load(object sender, System.EventArgs e)
{
  fc.AllowSplitArrows = false;
  fc.ModificationStart = ModificationStyle.AutoHandles;
  fc.CustomBehavior = new ArrowMoveBehavior(fc);
}

class ArrowMoveBehavior : FlowChartBehavior
{
  public ArrowMoveBehavior(FlowChart flowChart) : base(flowChart) {}

  public override InteractionState StartDraw(PointF point)
  {
    Arrow arrow = FlowChart.GetArrowAt(point, 1, true);
    int selectionHandle = -1;
    if (arrow != null && !arrow.HitTestHandle(point, ref selectionHandle))
    {
     FlowChart.Selection.AddObject(arrow.Origin);
     FlowChart.Selection.AddObject(arrow.Destination);
     return new InteractionState(FlowChart.Selection, 8, Action.Modify);
    }
    return base.StartDraw(point);
  }
}
 



Now dragging a control point will work as before. If you drag any other point of the arrow, the adjacent boxes will be selected, and the arrow shape will be preserved while the whole selection is moved. You might keep a boolean flag set and deselect the boxes upon MouseUp if you don't want them selected after the modification.

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


I love YaBB 1G - SP1!

Posts: 12
Joined: Nov 13th, 2006
Re: Move Arrows and selecting objects with RMB
Reply #4 - Nov 22nd, 2006 at 6:52am
Print Post  
Hey Stoyo

thx for your reply, will give it a try at once.

By the way, any news concerning the right mouse button issue?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Move Arrows and selecting objects with RMB
Reply #5 - Nov 22nd, 2006 at 8:24am
Print Post  
Hi Thorsten,

We are currently preparing a new version of the control for release, and are quite behind schedule. We'll add the new property when we are ready with the release and will upload the updated dlls here.

Stoyan
  
Back to top
 
IP Logged
 
Akira
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Nov 13th, 2006
Re: Move Arrows and selecting objects with RMB
Reply #6 - Nov 22nd, 2006 at 8:56am
Print Post  
Stoyo,

thx for the information - I wish you guys good luck with the new version.

Will wait till then - do you have an idea when you'll have time to do the property?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Move Arrows and selecting objects with RMB
Reply #7 - Nov 22nd, 2006 at 9:22am
Print Post  
That will be a small change so we'll do it on the day after the release, which should happen at some time next week.

Stoyan
  
Back to top
 
IP Logged
 
Akira
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Nov 13th, 2006
Re: Move Arrows and selecting objects with RMB
Reply #8 - Nov 22nd, 2006 at 11:16am
Print Post  
I've included your code in my project but unfortunately an error occurs now:
Error     1     'MindFusion.FlowChartX.Behaviors.FlowChartBehavior' is inaccessible due to its protection level

I've also included follow namespace:   using MindFusion.FlowChartX.Behaviors;

Any idea why this happens?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Move Arrows and selecting objects with RMB
Reply #9 - Nov 22nd, 2006 at 12:05pm
Print Post  
It seems that FlowChartBehavior has been made public only recently. Try that with these dlls:

https://mindfusion.org/_temp/v422.zip

There are some API changes though - you will have to change all "MindFusion.FlowChartX" namespace references to "MindFusion.Diagramming.WinForms". In addition, these dlls are from our daily build and might not be very stable.
  
Back to top
 
IP Logged
 
Akira
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Nov 13th, 2006
Re: Move Arrows and selecting objects with RMB
Reply #10 - Nov 22nd, 2006 at 5:12pm
Print Post  
thx Stoyo, will give it a try.

Cheers
Thorsten
  
Back to top
 
IP Logged
 
Akira
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 12
Joined: Nov 13th, 2006
Re: Move Arrows and selecting objects with RMB
Reply #11 - Nov 29th, 2006 at 12:38pm
Print Post  
Stoyo,

how is the release doing?

Do you have time to add the RMB property?


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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Move Arrows and selecting objects with RMB
Reply #12 - Nov 29th, 2006 at 1:35pm
Print Post  
We are testing and documenting the new features right now. Perhaps we'll release on Monday if there aren't any bugs found. Then we'll have a plenty of time for the RMB property Wink

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