Page 1 of 1

ChartListBox.Color at runtime

Posted: Thu Sep 21, 2006 11:39 am
by 9333771
hi,

I'm changing ChartListBox.Color at runtime and the background color is not refresh (repaint).

I tried to call .Invalitade or .repaint. but it doesn't change anything.

I must move a windows on top to provoc a repaint!

Is this a bug? any idea?

thanks in advance

Posted: Fri Sep 22, 2006 11:10 am
by narcis
Hi Mariano,

This is a bug (TV52011761) which I've added to our defect list to be fixed for future releases. In the meantime, a workaround is hidding the control and making it visible again after assigning the color so that it's fully repainted:

Code: Select all

procedure TForm1.FormCreate(Sender: TObject);
var i: Integer;
begin
  for i:=0 to Chart1.SeriesCount-1 do
    Chart1[i].FillSampleValues(); 

  ChartListBox1.Color:=clYellow;
end; 

procedure TForm1.Button1Click(Sender: TObject);
begin
  With ChartListBox1 do
  begin
    Color:=clLime;
    Visible:=false;
    Visible:=true;
  end;
end;