Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Color / Brush-Dialog (Read 1237 times)
shil
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 22
Joined: Aug 9th, 2007
Color / Brush-Dialog
Aug 9th, 2007 at 12:13pm
Print Post  
Hi there, i have a question about the brushes.
If i use a flowchart object in vs 2005 i can select a
brush for boxes, arrows and so on. now i want these
littel dialog, where u can select a style and colors, in my program. Is there any assembly where i can get this dialog?
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Color / Brush-Dialog
Reply #1 - Aug 9th, 2007 at 1:01pm
Print Post  
Hi,

That dialog is a property editor, associated with the Brush class using the Editor attribute. It seems the PropertyGrid control uses the following code to display property editors:

IUIService service = (IUIService) this.GetService(typeof(IUIService));
try
{
     if (service != null)
     {
           service.ShowComponentEditor(objectToEdit, this);
     }
}

I guess objectToEdit should be the Box.Brush. There is a lot more code there - so if the code above does not work, use the .NET Reflector tool to look at the PropertyGrid.OnViewButtonClickPP() method for other possible ways to display editors.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint