Hi,
I've tried this code for loading the last viewed chart from a registry setting,
if(Chart->Series[var])
Chart->Series[var]->Active = true;
or
for(int i = 0; i<ChartListBox->Count; i++){
if(ChartListBox->Series->Name == var){
Chart->Series->Active = true;
break;
}
}
Both work fine when the ChartListBox Sorted is Off. However, when On, I cannot seem to find away of identifying the last used series?
Thanks, nsm.
Loading last view chart with Sorted ON
Loading last view chart with Sorted ON
To be or not to be. This is not the question. Rather it is a choice.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi nile,
This works fine for me here using code below and using any Sorted setting.
Could you please send us a simple example project we can run "as-is" to reproduce the problem here? You can either post your files at news://www.steema.net/steema.public.attachments or at our upload page.
Thanks in advance.
This works fine for me here using code below and using any Sorted setting.
Code: Select all
procedure TForm1.Chart1ClickSeries(Sender: TCustomChart;
Series: TChartSeries; ValueIndex: Integer; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
var i: Integer;
begin
for i:=0 to ChartListBox1.Count-1 do
begin
ChartListBox1.Series[i].Active:=(ChartListBox1.Series[i].Name=Series.Name);
end;
end;
Thanks in advance.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |