Page 1 of 1
Error on deleting a shape polygone in TMapSeries
Posted: Sat Dec 06, 2008 10:55 pm
by 9334475
Hi,
I am trying to delete a Shape in TMapSeries in code like (either one)
SeriesMap.Shapes.Free;
SeriesMap.Shapes.Polygon.Free;
which returns Error in runtime.
Manual deleting (select+delete kbd button) gives error in Tee8new either.
Is there any way to delete a certain shape in TMapSeries
(like SeriesMap.Delete)?
regards,
odissey1
Posted: Tue Dec 09, 2008 11:40 am
by narcis
Hi odissey1,
Yes, you can use Delete method, for example:
Or deleting all polygons:
Code: Select all
for i := Series1.Count-1 downto 0 do
Series1.Delete(i);
Which is the equivalent of this:
Posted: Tue Dec 09, 2008 7:02 pm
by 9334475
narcis wrote:Hi odissey1,
Yes, you can use Delete method, for example:
-I am afraid not. At least not in my TeeChart v.7.12. Compiler say: 'There is no overload version of Series1.Delete(0)';
But something wrong in TeeChart 8.x also. Try to open Tee8new.exe -> MapGIS series -> Edit -> Shapes. Now select any shape with a mouse. Hit 'Delete' button on keyboard. You will get an error message.
Posted: Tue Dec 09, 2008 7:35 pm
by 9334475
But something wrong in TeeChart 8.x also. Try to open Tee8new.exe -> MapGIS series -> Edit -> Shapes. Now select any shape with a mouse. Hit 'Delete' button on keyboard. You will get an error message.
I posted a screenshot on Attachments forum
Posted: Wed Dec 10, 2008 9:11 am
by narcis
Hi odissey1,
-I am afraid not. At least not in my TeeChart v.7.12. Compiler say: 'There is no overload version of Series1.Delete(0)';
This works fine for me here using v8.04
But something wrong in TeeChart 8.x also. Try to open Tee8new.exe -> MapGIS series -> Edit -> Shapes. Now select any shape with a mouse. Hit 'Delete' button on keyboard. You will get an error message.
I could reproduce this and added the issue to the defect list (TV52013644) to be investigated.
Posted: Tue Feb 03, 2009 3:33 pm
by 10051462
don't know if it's correct but this also works like delete i think
Series1.Shapes
.Points.Delete(0,Series1.Shapes.Points.Count - 1,False);
am I right?
Posted: Mon Feb 09, 2009 12:07 pm
by Pep
Hi,
-I am afraid not. At least not in my TeeChart v.7.12. Compiler say: 'There is no overload version of Series1.Delete(0)';
It's strange, I've just checked the latest TeeChart Pro VCL v7 sources and you should be able to use the Delete method, it exists since the earlier versions. You could check if TeeChart is correctly installed.
don't know if it's correct but this also works like delete i think
Series1.Shapes.Points.Delete(0,Series1.Shapes.Points.Count - 1,False);
am I right? Confused
The Series.Delete(x) method deletes a specific shape from Map Series, and the method you're using Series.Shapes[x].Delete(start,end,removegaps) would remove all points from shape but wont remove (free) the shape created. it will remain there as a data point. The correct method to remove completely a specific shape is the Delete(x).
Posted: Mon Feb 09, 2009 12:33 pm
by 10051462
many thanks, I'm just using delete(x) but before tried the points.delete.
Howether thanks because it's always better to know the exact function of a procedure/function