How to access tool properties with Powerbuilder

TeeChart for ActiveX, COM and ASP
Post Reply
harald.hogestol
Newbie
Newbie
Posts: 1
Joined: Tue Mar 21, 2017 12:00 am

How to access tool properties with Powerbuilder

Post by harald.hogestol » Mon Feb 12, 2018 9:50 am

Hi! I am having trouble accessing propperties for SeriesBandTool from Powerbuilder.

This code works fine:

Code: Select all

integer li_tool
li_tool = this.object.tools.add(23)
this.object.tools.items(li_tool).active = true
But when I try to access the series property:

Code: Select all

this.object.tools.items(li_tool).series = this.object.series(0)
I get runtime error "Name not found accessing external object property series at line 52 ...."

I have also tried a VB example:

Code: Select all

this.object.tools.items(li_tool).asSeriesBandTool.series = this.object.series(0)
But that results in runtime error "Name not found accessing external object property asSeriesBandTool at line 52 ...."


How can I accomplish this?

Kind regards
Harald

Yeray
Site Admin
Site Admin
Posts: 9614
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: How to access tool properties with Powerbuilder

Post by Yeray » Wed Feb 14, 2018 3:08 pm

Hello,

Try "asSeriesBand" instead of "asSeriesBandTool".
This works fine for me here with the latest version v2018.0.2.9 in VB6:

Code: Select all

  TChart1.AddSeries scFastLine
  TChart1.Series(0).FillSampleValues 100
  
  TChart1.Tools.Add tcSeriesBand
  TChart1.Tools.Items(0).asSeriesBand.Series = TChart1.Series(0)
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply