Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Change appearance of Selection Frame (Read 1530 times)
CPF
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 14
Joined: Mar 16th, 2018
Change appearance of Selection Frame
Apr 3rd, 2018 at 3:22pm
Print Post  
Hi, I'm searching for a possibility to change the selection frame of my selected ControlNodes. The standard is a thin black and dashed line. I's like to have a more significant style, without changing anything else to the handle's behaviour.

Something like more thickness of the pen and color orange.

I just can't find a way to implement that with all those given pens and brushes.

any suggestions?
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Online


tech.support

Posts: 3153
Joined: Oct 19th, 2005
Re: Change appearance of Selection Frame
Reply #1 - Apr 3rd, 2018 at 9:25pm
Print Post  
Hi,

Try the HatchBrush property of ActiveItemHandlesStyle -

Code
Select All
diagram.ActiveItemHandlesStyle.HatchBrush =
	new MindFusion.Drawing.HatchBrush(
		HatchStyle.DarkDownwardDiagonal,
		Color.Orange, Color.Black);
diagram.AdjustmentHandlesSize *= 1.5f; 



and assign something similar to SelectedItemHandlesStyle for multiple selection.

Regards,
Slavcho
  
Back to top
 
IP Logged
 
CPF
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 14
Joined: Mar 16th, 2018
Re: Change appearance of Selection Frame
Reply #2 - Apr 4th, 2018 at 12:40pm
Print Post  
that didn't solve my exact problem, but that was the absolute right tip for the situation. At last, I implemented this code into my loadup routine:

diagramSchlachtfeld.AdjustmentHandlesSize = 10f;
            diagramSchlachtfeld.SelectedItemHandlesStyle.PatternBrush = diagramSchlachtfeld.ActiveItemHandlesStyle.PatternBrush = new MindFusion.Drawing.HatchBrush(System.Drawing.Drawing2D.HatchStyle.Weave, Color.DarkOrange, Color.Transparent);

I had to set SelectedItemHandlesStyle and ActiveItemHandlesStyle to have both: the last selected item and all other selected item to get the frame that I want. And I had to use the PatternBrush value, but I think this is due to the fact, that I am using 'MoveOnly' nodes in my diagram.

Again, that was quick an perfect help. Two thumbs up for this great forum and many thanks! I would have searched for ages with all those millions of different brushes and pens in the diagram.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint