Page 1 of 1
problem: TMarksTipTool in clx
Posted: Thu Sep 29, 2005 11:34 am
by 9342814
Hi.
I have problem using the TMarksTipTools in clx.
A few times application will show the tool tips but then the tool tips are invisible. Any idea? By the way, the onGetText event is working correctly.
I've posted I example in the publec news group - topic:
problem: TMarksTipTool in clx
Best regards,
Christian.
Posted: Mon Oct 03, 2005 11:25 am
by Pep
Hi Christian,
yes, you're correct, I'm able to reproduce the problem here, it seems to be a bug (however it only happens on a CLX app.) . I've added it on our defect list and a fix for it will be considered to inclusion for the next maintenance releases.
In meantime, you could simulate the MarksTip tool using the Canvas thechniques (or with Annotation tools).
Here I show you one example using the Canvas techniques :
Code: Select all
procedure TForm1.Chart1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer);
var tmp, tmpL : Integer;
begin
With Chart1 do
begin
If (Series1.Clicked(X, Y) <> -1) And (OnSeriesPoint = False) Then
begin
Canvas.Pen.Color := clBlack;
canvas.TextOut(x+10,y,FormatFloat('#.00',Series1.XScreenToValue(x))+','+FormatFloat('#.00',Series1.YScreenToValue(y)));
OnSeriesPoint := True;
End;
//Repaint Chart to clear Textoutputted Mark
If (Series1.Clicked(X, Y) = -1) And (OnSeriesPoint = True) Then
begin
OnSeriesPoint := False;
Repaint;
End;
tmpL := Chart1.Legend.Clicked(X, Y);
If (tmpL <> -1) And ((tmpL <> tmpL2) Or (OnLegendPoint = False)) Then
begin
Repaint;
Canvas.Brush.Color := Series1.LegendItemColor(tmpL);
Canvas.Rectangle( X, Y, X + 20, Y + 20);
canvas.TextOut(x+7,y+7,FormatFloat('#.00',Series1.XValues.Items[Series1.LegendToValueIndex(tmpl)]));
tmpL2 := tmpL;
OnLegendPoint := True;
End;
If (Legend.Clicked(X, Y) = -1) And (OnLegendPoint = True) Then
begin
OnLegendPoint := False;
Repaint;
End;
End;
end;