Page 1 of 1

Inconsistency in colors

Posted: Thu Mar 07, 2019 11:51 am
by 17185819
We have noticed, that TChart.background uses SWT colors while the rest uses your own color class. Is there a reason behind that?

Re: Inconsistency in colors

Posted: Tue Mar 19, 2019 2:33 pm
by Marc
Hello,

Yes, not sure why it is the way it is. Internally it calls the TeeChart Color class.

ie.

Code: Select all

public void setBackground(Color value) {
	chart.getPanel().setColor(new com.steema.teechart.drawing.Color(value.getRed(), value.getGreen(), value.getBlue()));
}
Perhaps when the SWT version was being designed originally there was a need for SWT color to be set and simply it wasn't changed to the TeeChart colour once code had consolidated.

Regards,
Marc

Re: Inconsistency in colors

Posted: Wed Mar 20, 2019 8:10 am
by yeray
Just to add a note.
TChart class in TeeChart Java SWT inherits from Composite which inherits getBackground and setBackground from Control.