Hello,
When you click at a place where 2 annotations are superimposed, the one which is behind is selected, and not the foreground annotation as it should be.
See the example below : I clicked on top of the first annotation and it's the one which is behind that has been selected.
Is there a way to correct this problem ?
Moving annotations which are superimposed
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi bertrod,
Thanks for reporting, I could reproduce this and added the issue to our wish-list to be enhanced for future releases.
Thanks for reporting, I could reproduce this and added the issue to our wish-list to be enhanced for future releases.
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Hey Narcis,narcis wrote:Hi bertrod,
Thanks for reporting, I could reproduce this and added the issue to our wish-list to be enhanced for future releases.
I don't have time to wait for the next release and I will try to solve this problem myself. Could you help me a little bit by telling me how do you think it's possible to know which annotation is OVER the other one ? Can I use the order of creation or something like this ?
Thanks
Hi bertrod,
to accomplish it you could use similar code to the following :
to accomplish it you could use similar code to the following :
Code: Select all
procedure TDragAnnotation.Chart1MouseDown(Sender: TObject;
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
var i,xx,yy : integer;
s: string;
begin
with Chart1.Tools do
begin
for i := 0 to Count -1 do
begin
with Items[i] as TAnnotationTool do
begin
if Clicked(X,Y) then
begin
Fitem := i;
end;
end;
end;
// save text of the annotation
s:= (chart1.Tools.Items[fitem] as TAnnotationTool).Text;
xx:= (chart1.Tools.Items[fitem] as TAnnotationTool).Shape.Left;
yy:= (chart1.Tools.Items[fitem] as TAnnotationTool).Shape.Top;
chart1.Tools.Delete(fitem);
with (Chart1.Tools.Add(TAnnotationTool.Create(Chart1)) as TAnnotationTool)
do begin
ParentChart := Chart1;
Text := s;
Shape.CustomPosition := True;
Shape.Left := xx;
Shape.Top := yy;
end;
end;
end;
Pep Jorge
http://support.steema.com
http://support.steema.com