Page 1 of 1

Drag Colorband

Posted: Fri Feb 22, 2008 3:27 pm
by 10047047
Hi,

I added TColorBandTool to the TChart. I want to display whether the startline or endline is dragging and value of the startline or endline when dragging the startline or endline of the colorband. How can I do that?

Cheers

Xia

Posted: Fri Feb 22, 2008 3:47 pm
by narcis
Hi Xia,

Yes, this is possible. You can either to something like this:

Code: Select all

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  if ChartTool1.StartLine.Clicked(X,Y) then
    Chart1.Title.Text[0]:=FloatToStr(ChartTool1.StartValue);

  if ChartTool1.EndLine.Clicked(X,Y) then
    Chart1.Title.Text[0]:=FloatToStr(ChartTool1.EndValue);
end;
Or this:

Code: Select all

procedure TForm1.Chart1MouseDown(Sender: TObject; Button: TMouseButton;
  Shift: TShiftState; X, Y: Integer);
begin
  if ChartTool1.StartLine.Clicked(X,Y) then
    StartClicked:=true
  else
    StartClicked:=false;

  if ChartTool1.EndLine.Clicked(X,Y) then
    EndClicked:=true
  else
    EndClicked:=false;
end;

procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
  Y: Integer);
begin
  Chart1.Title.Text.Clear;

  if StartClicked then
    Chart1.Title.Text.Add(FloatToStr(ChartTool1.StartValue));

  if EndClicked then
    Chart1.Title.Text.Add(FloatToStr(ChartTool1.EndValue));
end;
Hope this helps!

Posted: Mon Feb 25, 2008 9:30 am
by 10047047
Hi Narcis,

Yes. That's what I need. Thanks.

By the way, do you have help documentation for TNumericGauge. I can't find in the TeeChart user guide and tutorials came with TeeChart 8.01 for C++ Builder 2007.

Cheers

Xia

Posted: Mon Feb 25, 2008 11:35 am
by narcis
Hi Xia,
Yes. That's what I need. Thanks.
You're welcome. I'm glad to hear that.
By the way, do you have help documentation for TNumericGauge. I can't find in the TeeChart user guide and tutorials came with TeeChart 8.01 for C++ Builder 2007.
Please notice that latest TeeChart Pro v8 release available at the client download area is v8.02. This version includes documentation for TNumericGauge at TeeChart8.hlp.

Posted: Tue Feb 26, 2008 9:55 am
by 10047047
Hi Narcis,

I have downloaded the latest V8.02 which has the help file for TNumericGauge.

I noticed that the TeeCommander toolbar style has been changed. I had a program using a TeeCommander toolbar. The program was fine with V8.01 style of toolbar but it has problems with V8.02 toolbar. The images of the toolbar buttons seem shifted by half of the button size (How can I send you an image of the screen print?), and it shows an error message "invalid property value" when clicking the Edit button. Are there some files need to be added with new version?

Thanks

Xia

Posted: Tue Feb 26, 2008 10:04 am
by narcis
Hi Xia,

Yes, TeeCommander has been redesigned. However, this is the first time we hear about that problem. Could you please send us an image and a simple example project we can run "as-is" to reproduce this issue here?

You can post your files at news://www.steema.net/steema.public.attachments newsgroup or at the upload page.

Thanks in advance.

Posted: Wed Feb 27, 2008 9:37 am
by 10047047
Hi Narcis,

I have found the problem. It was because both V8.01 and V8.02 are installed. After uninstall the V8.01, the software works fine.

Thanks anyway.

Xia