User (Legacy) Posted January 11, 2005 Report Share Posted January 11, 2005 I am trying to put re-sizing bars on the overall chart window, but drawing using the graphics object given by chart1.PostPaint does not include the legend area, or the legend painting is wiping out this painting. Is there a Paint event for your chart container that includes the entire surface or is the last control to get painted? Or, what other means do you suggest? Thanks, Greg Link to comment Share on other sites More sharing options...
Software FX Posted January 11, 2005 Report Share Posted January 11, 2005 No. There are several controls inside the Chart Control. Legend Box, Drawing area, etc. We can not give you a Graphics that span across many controls because it does not exist. I suggest you put these bars outside of the chart control. -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 11, 2005 Author Report Share Posted January 11, 2005 Placing the resizing handles outside of the chart means that the user could never move a chart to be flush with the edge (window, screen, etc.). Surely someone has managed this (resizing handle bars atop the full chart). -Greg "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:J1Bmno$9EHA.1580@webserver3.softwarefx.com... > No. There are several controls inside the Chart Control. Legend Box, > Drawing area, etc. We can not give you a Graphics that span across many > controls because it does not exist. > > I suggest you put these bars outside of the chart control. > > -- > FP > Software FX > Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 11, 2005 Author Report Share Posted January 11, 2005 Why can't I catch the chart1.Paint event? (and eventually override and call its base) I get a compile error when attempting to work with the .Paint event, even though the visual designer creates code to catch this event for me. Surely that is not intended. -Greg Link to comment Share on other sites More sharing options...
Software FX Posted January 12, 2005 Report Share Posted January 12, 2005 The Paint event won't do it. You want to paint across many controls and that's not the way it works in .NET (or in Windows for that matter). The are in which you want to paint is shared by several controls. The chart control (parent), the drawing area, the legend box, the data editor. Most of the chart's control area is covered by these child controls so even if you paint something there, it will get covered by these. The only way would be to paint a piece of this "resizing bar" on each of the controls but this will require figuring out where they are, etc. Not impossible but certainly complicated. > Why can't I catch the chart1.Paint event? (and eventually override and > call its base) Capturing an event doesn't override anything. If you want to override Paint you need to make a class that derives from chart and override OnPaint. But as I said above, I don't think this will help. As for the Compile error, it seems that the compiler gets confused with the Paint method (same name). Can you attach an image of what you want to draw ? -- FP Software FX Link to comment Share on other sites More sharing options...
User (Legacy) Posted January 12, 2005 Author Report Share Posted January 12, 2005 Attached is an image that shows the concept (not working, of course) of resizing handles. If I could get a PostPaint event from the last control painted (surely there is an order), I should be able to paint anywhere without having my painting get over-written. -Greg "SoftwareFX Support" <noreply@softwarefx.com> wrote in message news:sJIiHvL%23EHA.3492@webserver3.softwarefx.com... > The Paint event won't do it. You want to paint across many controls and > that's not the way it works in .NET (or in Windows for that matter). > > The are in which you want to paint is shared by several controls. The > chart > control (parent), the drawing area, the legend box, the data editor. Most > of > the chart's control area is covered by these child controls so even if you > paint something there, it will get covered by these. > > The only way would be to paint a piece of this "resizing bar" on each of > the > controls but this will require figuring out where they are, etc. Not > impossible but certainly complicated. > >> Why can't I catch the chart1.Paint event? (and eventually override and >> call its base) > > Capturing an event doesn't override anything. If you want to override > Paint > you need to make a class that derives from chart and override OnPaint. But > as I said above, I don't think this will help. > > As for the Compile error, it seems that the compiler gets confused with > the > Paint method (same name). > > Can you attach an image of what you want to draw ? > > -- > FP > Software FX > > Link to comment Share on other sites More sharing options...
Software FX Posted January 12, 2005 Report Share Posted January 12, 2005 Personally I do not think it is worth to try to paint each handle in a potentially different window, I would recommend you create a wrapper control who contains the chart with a margin equal to the size of the handle and then paint and handle the click events in the wrapper. -- JC Software FX "Greg" <greg@nowhere.com> wrote in message news:tfgf9mN%23EHA.1116@webserver3.softwarefx.com... > Attached is an image that shows the concept (not working, of course) of > resizing handles. > > If I could get a PostPaint event from the last control painted (surely > there is an order), I should be able to paint anywhere without having my > painting get over-written. > > -Greg > > "SoftwareFX Support" <noreply@softwarefx.com> wrote in message > news:sJIiHvL%23EHA.3492@webserver3.softwarefx.com... >> The Paint event won't do it. You want to paint across many controls and >> that's not the way it works in .NET (or in Windows for that matter). >> >> The are in which you want to paint is shared by several controls. The >> chart >> control (parent), the drawing area, the legend box, the data editor. Most >> of >> the chart's control area is covered by these child controls so even if >> you >> paint something there, it will get covered by these. >> >> The only way would be to paint a piece of this "resizing bar" on each of >> the >> controls but this will require figuring out where they are, etc. Not >> impossible but certainly complicated. >> >>> Why can't I catch the chart1.Paint event? (and eventually override and >>> call its base) >> >> Capturing an event doesn't override anything. If you want to override >> Paint >> you need to make a class that derives from chart and override OnPaint. >> But >> as I said above, I don't think this will help. >> >> As for the Compile error, it seems that the compiler gets confused with >> the >> Paint method (same name). >> >> Can you attach an image of what you want to draw ? >> >> -- >> FP >> Software FX >> >> > > > chartfxborder.bmp Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.