Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 How to do Borders

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List

* Forum Code is ON
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]


T O P I C    R E V I E W
Mobashar Posted - 28 Jul 2005 : 07:16:22
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.

1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 28 Jul 2005 : 10:21:11

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();
ChartShape borderShape = new ChartShape(pTransform1, rectpath,
	ChartObj.NORM_GRAPH_POS, 0, 0, ChartObj.NORM_GRAPH_POS,0);
borderShape.ChartObjClipping = ChartObj.GRAPH_AREA_CLIPPING;

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07