We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

node selection(focus) problem

Thread ID:

Created:

Updated:

Platform:

Replies:

79255 Jan 27,2009 04:33 AM Feb 5,2009 06:57 AM Windows Forms 6
loading
Tags: Diagram
Administrator [Syncfusion]
Asked On January 27, 2009 04:33 AM

Hi,

I have the following code part;


void EventSink_NodeClick(NodeMouseEventArgs evtArgs)
{
evtArgs.Node.EditStyle.AllowChangeHeight = false;

}

When user clicks to a node,he/she will not be able to change Height of it.
But if the same node clicked again, diagram allows to change the height of it. So I can not control the "EditStyle" properties as I want. (if a node is clicked 3-4 times focus jumps to the other nodes.)

the number of clicks on a node should not change anything.How can I manage this?

Thanks for your help


Ajeet M [Syncfusion]
Replied On January 28, 2009 08:35 AM

Hi ace,

I assume that you are using the latest version of syncfusion assemblies.

I am afraid but I am not able to reproduce the issue.

I set the same code snippet to disable height modification.

The Node does not allow height to be changed then after.

The sample file is attached herewith for your perusal.

Also, by default the diagram convention of "NodeClick" event is to cycle through the ZOrders of every node present at a same point of mouse click, starting from the top most node to the node lowest at the "clicked mouse point".

Let me know if this helps.

Happy coding!
- Ajeet




Diagram_WF_NodeEvents_86a47cd6.zip

Administrator [Syncfusion]
Replied On January 28, 2009 10:22 AM

Hi Ajeet,

I solve the problem by disabling the size changing allmost everytime any event occurs.

In your program when you drag and drop circle or ellipse you can change their height and width just after dropping them. if you consider the rectangle some different things happen.

your program doesn't produce same problem with me but It seems it doesnt act as it should.

As I told, I solved my problem and thank you for your afford for help.



Ajeet M [Syncfusion]
Replied On January 29, 2009 03:14 AM

Hi ace,

Yes, you are right that the SizeChanging Event can be cancelled, but that will disable both change in height and change in width by default.

Also, I am afraid as I was not able to change the height of the Circle or Ellipse as soon as I dropped it to the diagram and NodeClicked() on it.

Let me know if you shall need any further clarifications here.

Happy Coding!,
- Ajeet


Administrator [Syncfusion]
Replied On January 30, 2009 07:34 AM

Hi Ajeet,

You said;
"Also, by default the diagram convention of "NodeClick" event is to cycle through the ZOrders of every node present at a same point of mouse click, starting from the top most node to the node lowest at the "clicked mouse point"."

This is the cause of my problem. I don't want it to cycle through the ZOrders of every node present at a same point. Can I stop cycling?






Ajeet M [Syncfusion]
Replied On February 2, 2009 03:57 AM

Hi ace,

The cycling through all the nodes under the same point is an inherent property, which can not be overrided.

However, you can be assured that the "Node" which is at the top, among all the nodes that are placed under the same point location; the MouseClick() and NodeClick() and NodesHit will all return the "Top Most Node".

Also, its only the focus that changes in cyclic order, which can be overridden as follows:

In the MouseUp() event type the following code snippet:

void diagram1_MouseUp(object sender, MouseEventArgs e)
{
if (!this.diagram1.Controller.SelectionList.IsEmpty)
{
this.diagram1.Controller.SelectionList.Clear();
this.diagram1.Controller.SelectionList.Add(this.diagram1.Controller.NodesHit.First);
}
}

This ensures that the selected"Node" is the always focused.

Let me know if you shall need any further clarifications in this regard.


Happy Coding!
- Ajeet


Administrator [Syncfusion]
Replied On February 5, 2009 06:57 AM

That helped a lot
Thanks for your concern Ajeet.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;