Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 63

Summary: ColorBandTool in a TScrollPagerTool not updated on TAxisArrowTool's OnClick event.
Product: FireMonkey TeeChart Reporter: narcís calvet <narcis>
Component: ToolsAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED NOTABUG    
Severity: normal    
Priority: ---    
Version: 131016   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: XE4 project

Description narcís calvet 2013-10-28 07:55:47 EDT
Created attachment 8 [details]
XE4 project

I'd like to move TScrollPagerTool's ColorBandTool to the end of the chart when TAxisArrowTool's OnClick event is fired. Changing it manually doesn't work, ColorBand goes back to its original position:

void __fastcall TForm3::ChartTool1Click(TAxisArrowTool *Sender, bool AtStart)
{
  float fWidth = scrollPager1->ColorBandTool->EndValue - scrollPager1->ColorBandTool->StartValue;

  scrollPager1->ColorBandTool->StartValue = ChartTool1->Axis->Maximum - fWidth;
  scrollPager1->ColorBandTool->EndValue = ChartTool1->Axis->Maximum;
}

Attached a project reproducing the issue.
Comment 1 narcís calvet 2013-10-28 09:14:17 EDT
The problem is due to this line:

  ChartTool1->Axis =  scrollPager1->SubChartTChart->BottomAxis;

Changing it to:

  ChartTool1->Axis =  Chart1->Axes->Bottom;

The ColorBand moves accordingly.