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
Error on deleting a shape polygone in TMapSeries
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi odissey1,
Yes, you can use Delete method, for example:
Or deleting all polygons:
Which is the equivalent of this:
Yes, you can use Delete method, for example:
Code: Select all
Series1.Delete(0);
Code: Select all
for i := Series1.Count-1 downto 0 do
Series1.Delete(i);
Code: Select all
Series1.Clear;
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 |
-I am afraid not. At least not in my TeeChart v.7.12. Compiler say: 'There is no overload version of Series1.Delete(0)';narcis wrote:Hi odissey1,
Yes, you can use Delete method, for example:
Code: Select all
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.
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi odissey1,
This works fine for me here using v8.04-I am afraid not. At least not in my TeeChart v.7.12. Compiler say: 'There is no overload version of Series1.Delete(0)';
I could reproduce this and added the issue to the defect list (TV52013644) to be investigated.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.
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 |
Hi,
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).
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.-I am afraid not. At least not in my TeeChart v.7.12. Compiler say: 'There is no overload version of Series1.Delete(0)';
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).
Pep Jorge
http://support.steema.com
http://support.steema.com