Jump to content
Software FX Community

Set Gallery to Curve causes compile error (c#)


User (Legacy)

Recommended Posts

Hi,

in the VS.NET GUI designer, I set my chart's Gallery to Curve.

It generates the following 2 lines:

this._chart.Gallery = SoftwareFX.ChartFX.Gallery.Curve;

this._chart.GalleryObj.Native = true;

The second line causes compile error because GalleryObject is of type object

which doesn't have a property call Native.

Is this a bug?

Ming

Link to comment
Share on other sites

As I mentioned before, the problem is that this code was generated by the

VS.NET GUI Designer.

Yes, I can manually make the cast but each time I make change the chart, it

regenerate that code again.

Can you reproduce that?

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:1CxD8NHDFHA.2488@webserver3.softwarefx.com...

> No. This is not a bug. The type of GalleryObj is defined as object as it

can

> not change when the gallery changes. You need to cast it to he appropriate

> type:

>

> ((SoftwareFX.ChartFX.GalleryObj.Surface) this._chart.GalleryObj).Native =

> true;

>

> FYI: Native = true is the default setting.

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

No. What I get when I set it at design time is:

this.chart1.Gallery = SoftwareFX.ChartFX.Gallery.Curve;

((SoftwareFX.ChartFX.GalleryObj.Curve)(this.chart1.GalleryObj)).Native =

false;

We have a TypeConverter that makes this possible. I don't know why this is

not working on your side.

What version of VS are you using ? What version (build) of ChartFX ?

--

FP

Software FX

Link to comment
Share on other sites

No. What I get when I set it at design time is:

this.chart1.Gallery = SoftwareFX.ChartFX.Gallery.Curve;

((SoftwareFX.ChartFX.GalleryObj.Curve)(this.chart1.GalleryObj)).Native =

false;

We have a TypeConverter that makes this possible. I don't know why this is

not working on your side.

What version of VS are you using ? What version (build) of ChartFX ?

--

FP

Software FX

Link to comment
Share on other sites

ChartFX 6.2.1342.0

VS 7.1.3088

.NET Framework 1.1.4322

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:4lAuhJgDFHA.2536@webserver3.softwarefx.com...

> No. What I get when I set it at design time is:

>

> this.chart1.Gallery = SoftwareFX.ChartFX.Gallery.Curve;

>

> ((SoftwareFX.ChartFX.GalleryObj.Curve)(this.chart1.GalleryObj)).Native =

> false;

>

>

> We have a TypeConverter that makes this possible. I don't know why this is

> not working on your side.

>

> What version of VS are you using ? What version (build) of ChartFX ?

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Found the problem.

We have a wrapper (inheritance) class around SoftwareFX.ChartFX.Chart class.

I think that is what causes it not to cast probably.

When I tested with direct SoftwareFX.ChartFX.Chart class, it works as you

stated.

Is there any way I can fix the wrapper class?

It is a straight inheritance from SoftwareFX.ChartFX.Chart.

Thanks again.

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:4lAuhJgDFHA.2536@webserver3.softwarefx.com...

> No. What I get when I set it at design time is:

>

> this.chart1.Gallery = SoftwareFX.ChartFX.Gallery.Curve;

>

> ((SoftwareFX.ChartFX.GalleryObj.Curve)(this.chart1.GalleryObj)).Native =

> false;

>

>

> We have a TypeConverter that makes this possible. I don't know why this is

> not working on your side.

>

> What version of VS are you using ? What version (build) of ChartFX ?

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

where in my contol??

"SoftwareFX Support" <noreply@softwarefx.com> wrote in message

news:e%23XHZ34DFHA.2544@webserver3.softwarefx.com...

> Yes. That is because the Designer attribute is probably not inherited.

>

> Try adding this to your control:

>

> Designer("SoftwareFX.ChartFX.Designer.ClientDesigner,ChartFX.Designer,

> Version=6.2.1342.0"),

>

>

> --

> FP

> Software FX

>

>

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...