Page 1 of 1

LightTool DrawStyle

Posted: Tue Sep 03, 2019 2:44 pm
by 16686320
Hi,

I've added a light tool to my chart but I want to set the DrawStyle property to be Before Chart. The property is not mentioned in the documentation and everything I have tried just errors with invalid property. Any ideas?

Code: Select all

ole_tchart.GetChart().Tools().Add(u_tchart.ll_tool_Light)
ole_tchart.GetChart().Tools(0).asLight.DrawStyle = 2

Re: LightTool DrawStyle

Posted: Thu Sep 05, 2019 1:35 pm
by yeray
Hello,

Here the TLightDrawStyle definition in Delphi (note TeeChart ActiveX is a wrapper from TeeChart VCL):

Code: Select all

  TLightDrawStyle=(ldsAfterChart,
                   ldsBeforeChart,
                   ldsAfterSeries,
                   ldsBeforeSeries,
                   ldsBeforeAxes);

Re: LightTool DrawStyle

Posted: Thu Sep 05, 2019 2:27 pm
by 16686320
Hi,

Thanks but this is not helping.

The problem is not the definitions, it's the property I should be using. According to the VCL reference it should be DrawStyle but I just get an error saying it doesn't exist.

Code: Select all

ole_tchart.GetChart().Tools(0).asLight.DrawStyle
I can't set the Factor or Style property either. When I reference the tool using .asLight I get an object. As it's ActiveX it's impossible to inspect to expose the properties. All other tools I use work fine e.g. .asColorLine or .asScrollPager

I am using a build you sent me a few day's ago which had a bug fix in for Maps & Scroll Pagers. Could this perhaps be another bug?

Re: LightTool DrawStyle

Posted: Fri Sep 06, 2019 11:26 am
by yeray
Hello,

You are right. I've added it to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=2235