Page 1 of 1

How to access tool properties with Powerbuilder

Posted: Mon Feb 12, 2018 9:50 am
by 16680565
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

Re: How to access tool properties with Powerbuilder

Posted: Wed Feb 14, 2018 3:08 pm
by yeray
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)