Group: Forum Members
Last Active: 14 Years Ago
Posts: 2,
Visits: 1
|
Thx
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,009
|
Hi, to change the stroke style of a single node when selected you can subscribe to the NodeSelected (change the stroke style there) and NodeDeselected (restore the stroke style there) events of the drawing view's event sink service. Note that you should also change the selected appearance change mode of the view, so that it does not change the stroke style of the selected node: view.InteractiveAppearance.SelectedAppearanceChangeMode = AppearanceChangeMode.None;
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 14 Years Ago
Posts: 2,
Visits: 1
|
Hi, to set the SelectedStrokeStyle property of a view, we do :
NStrokeStyle nst = new NStrokeStyle(Color.Red); nst.Width = new NLength(2); view.InteractiveAppearance.SelectedStrokeStyle = nst;
I'm trying to set the SelectedStrokeStyle property of a specific node of my View :
//ks is a specialized NNode : NStrokeStyle nst = new NStrokeStyle(Color.Red); nst.Width = new NLength(2); NInteractiveAppearance nia = new NInteractiveAppearance(); nia.SelectedStrokeStyle = nst; ks.Style.InteractivityStyle = new NInteractivityStyle(); ks.Style.InteractivityStyle.InteractivityAttributes = new NInteractivityAttributeCollection(); ks.Style.InteractivityStyle.InteractivityAttributes.Add(nst);
But that not works, how can I set the "InteractiveAppearance -> SelectedStrokeStyle" of only one Node ?
|
Group: Forum Members
Last Active: Last Week
Posts: 3,054,
Visits: 4,009
|
There are many ways to do this. Take a look at the view.InteractivityManager. For example you can set the ChangeSelectedText property of the interactivity manager to false. Another possible solutions are to change the SelectedStrokeStyle or the SelectedAppearanceChange.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 14 Years Ago
Posts: 13,
Visits: 1
|
I have a diagram, where some of the nodes background color is red. When I select a node with a red background color, the text disappears. I saw that whenever selecting a node, the shape text color is painted red. Can this be modified?
|