Page 1 of 1

gridband problems

Posted: Fri Mar 10, 2006 11:53 am
by 9638326
hi there,

i got a problem with the recoloring the gridband when the grid is activ. When user changes color of the gridband at runtime, the grid is overpainted and not seen anymore...how to avoid this?
bg,
Robert

Posted: Fri Mar 10, 2006 1:02 pm
by narcis
Hi Robert,

I'm unable to reproduce it here using latest TeeChart version available. Should I follow any specific step to reproduce the issue? Which TeeChart version are you using?

Thanks in advance.

Posted: Fri Mar 10, 2006 1:28 pm
by 9638326
hi narcis,

im just activating the gridband with

Code: Select all

this.chart.GetGridBand.Active=true;
then asigning colors like

Code: Select all

this.chart.GetGridBand.Band1.Color=this.colorDialog5.Color;
this.chart.GetGridBand.Band2.Color=this.colorDialog6.Color;
and then the grid is gone.
I am using Teechart .NET V2.
regards,
Robert

Posted: Fri Mar 10, 2006 2:19 pm
by narcis
Hi Robert,

It works fine here using the code below and latest TeeChart for .NET v2 debug build available at our Customer Download Area. Can you please test if this works at your end and, if necessary, modify the code so that we can reproduce the problem here?

Code: Select all

    private void Form1_Load(object sender, EventArgs e)
    {
      line1.FillSampleValues();

      this.colorDialog1.Color = Color.Gray;
      this.colorDialog2.Color = Color.Red;      

      this.gridBand1.Band1.Color = this.colorDialog1.Color;
      this.gridBand1.Band2.Color = this.colorDialog2.Color;
    }

    private void button1_Click(object sender, EventArgs e)
    {
      this.colorDialog1.ShowDialog();
      this.gridBand1.Band1.Color = this.colorDialog1.Color;
    }

    private void button2_Click(object sender, EventArgs e)
    {
      this.colorDialog2.ShowDialog();
      this.gridBand1.Band2.Color = this.colorDialog2.Color;
    }
Thanks in advance.

Posted: Thu Mar 16, 2006 1:11 pm
by 9638326
hi narcis,

looks like it was a matter of tranparency. Since the gridband is painted above the grid its not visible when gridband.bands transparency is set to zero.
The unlogic in this is just that it starts !=0 and when the user sets a bandcolor the transparency is set to 0 which ends in hiding the grid.)

Posted: Fri Mar 17, 2006 10:29 am
by narcis
Hi Robert,

Yes, you may be right. I ignore why the GridBand tool is initialized with both bands being black. I'll add this to our wish-list to be considered for future releases.