Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic PenEditor and BrushEditor (Read 1115 times)
agelospanagiotakis
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 9
Joined: Mar 27th, 2007
PenEditor and BrushEditor
May 15th, 2007 at 5:38pm
Print Post  
I am currently using flowchart 4.2.2.17673
I want to know if thereis a way to add the existing Editors for the proprtygrid
BrushEditor
PenEditor
etc.
They are not public (actually private) so the following lines are not  successfull
<Browsable(True), _
       Category("Graphical Properties"), _
       DisplayName("Brush"), _
       DefaultValue(GetType(Brush), "None"), _
       Description("This nodes brush") ,  _
Editor(GetType(MindFusion.Drawing.Design.BrushEditor), GetType(Drawing.Design.UITypeEditor))> _
       Public Property Brush() As MindFusion.Drawing.LinearGradientBrush
           Get
               Return mBrush
           End Get
           Set(ByVal Value As MindFusion.Drawing.LinearGradientBrush)
               mBrush = Value
           End Set
       End Property

also this does not work

<Browsable(True), _
       Category("Graphical Properties"), _
       DisplayName("Brush"), _
       DefaultValue(GetType(Brush), "None"), _
       Description("This nodes brush") ,  _
Editor("MindFusion.Drawing.Design.BrushEditor, MindFusion.Diagramming.WinForms.FlowChart, FlowChart.NET, Version=4.2.2.17673, Culture=neutral, PublicKeyToken=null"> _
       Public Property Brush() As MindFusion.Drawing.LinearGradientBrush
           Get
               Return mBrush
           End Get
           Set(ByVal Value As MindFusion.Drawing.LinearGradientBrush)
               mBrush = Value
           End Set
       End Property



will these be re declared soon "Public" not private?
is there any other way to override this problem without creating a new brush edotor?

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


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: PenEditor and BrushEditor
Reply #1 - May 15th, 2007 at 6:25pm
Print Post  
In version 4.3 the BrushEditor is associated with the Brush class, and it should be automatically used for all properties of type Brush, even your custom ones. In older versions the Editor attribute was applied to the properties of type Brush, but not the Brush class itself, so that did not work well for custom Brush properties. With version 4.2, the following should work when applied to a property:

[Editor("MindFusion.Drawing.Design.BrushEditor,
   FlowChart.NET, Version=4.2.2.17673, Culture=neutral,
   PublicKeyToken=xxxxxxxxxxxxxxx", typeof(UITypeEditor))]

The PublicKeyToken might differ between the different Flowchart.NET versions, depending on whether you are using Standard or Pro, Trial or Licensed, .NET 1.1 or .NET 2.0 dlls, so check the token for your version it using the Ildasm tool.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint