Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 How to do Borders
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mobashar

5 Posts

Posted - 28 Jul 2005 :  07:16:22  Show Profile  Reply with Quote
Another simple one I think...

How do I set a border and border colour around the actual ChartView control droppe don the form?

Thanks in advance.

Bash

quinncurtis

1164 Posts

Posted - 28 Jul 2005 :  10:21:11  Show Profile  Reply with Quote

The System.Windows.Forms.UserControl class that our ChartView class derives from does not support Windows style borders. So if you want one of the Windows style borders, place the ChartView derived class in a System.Windows.Forms.Panel
object, and use the BorderStyle property of the Panel to define a border. You can set the Dock property (derived from UserControl) of the ChartView object to Fill so that the ChartView fills the entire Panel.

Or you can just draw a rectangle using the QCChart2D routines. The example below draws a border at the inside edge of the ChartView.

Color borderColor =  Color.Black;
ChartAttribute attrib2 = new ChartAttribute (borderColor, 1,DashStyle.Solid);
Rectangle2D borderRect = new Rectangle2D(0, 0, 0.99 , 0.99);
GraphicsPath rectpath = new GraphicsPath();
rectpath.AddRectangle(borderRect.GetRectangleF());
ChartShape borderShape = new ChartShape(pTransform1, rectpath,
	ChartObj.NORM_GRAPH_POS, 0, 0, ChartObj.NORM_GRAPH_POS,0);
borderShape.ChartObjClipping = ChartObj.GRAPH_AREA_CLIPPING;
borderShape.SetChartObjAttributes(attrib2);
chartVu.AddChartObject(borderShape);


Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07