Jump to content
Software FX Community

chart container painting


User (Legacy)

Recommended Posts

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

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

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...