When selecting a node in the diagram, text disaapears


Author
Message
yoav Roytenberg
yoav Roytenberg
Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)Junior Member (13 reputation)
Group: Forum Members
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?
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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


Jérôme Bouche
Jérôme Bouche
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
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 ?
Nevron Support
Nevron Support
Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)Supreme Being (4.5K reputation)
Group: Administrators
Posts: 3.1K, Visits: 4.2K

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


Jérôme Bouche
Jérôme Bouche
Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)Forum Newbie (2 reputation)
Group: Forum Members
Posts: 2, Visits: 1
Thx
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search