IGraphicsContain 删除元素
来源:互联网 发布:网络pc赌博怎么判刑 编辑:程序博客网 时间:2024/05/16 18:24
刚想实现删除axMapControl 中指定的元素。实现该功能首先得获取欲删除的Element。
下面代码为遍历方式获取其中的Element
IGraphicsContainer pGrappic=axMapControl1.Actiview as IGrapicsContainer IElement pElement = pGraphic.Next();
IGraphicsContainer 还提供了交互式的获取Elments,其中包括以point的选的 pGraphic.LocateElements和以Envelope 选的pGraphic.LocateElementsByEnvelope。
此为第一种方式。即需人际交互式。
第二种方式为: 在创建Element的时候指定Element的名字,删除的时候删除指定的名称的Element的
IElement pElement = pGraphic.Next(); while (pElement != null) { IElementProperties pd = pElement as IElementProperties; if (pd.Name == name) { pGraphic.DeleteElement(pElement); } pElement = pGraphic.Next(); }
给Element 指定名字的时候也是得QI到IElementProperties 接口
IElementProperties pEl=pElement as IElementProperties.pEl.Name="****";
0 0
- IGraphicsContain 删除元素
- 删除元素.
- 删除元素
- 删除元素
- 删除元素
- 删除元素
- 删除元素
- 删除元素
- 删除元素
- 删除元素
- 删除元素
- 删除元素
- 删除元素
- 元素删除
- 创建元素和删除元素
- 删除数组元素.
- c++ vector删除元素
- 通过reverse_iterator删除元素
- IDL 打开多波段图像
- ENVI\IDL 与C# 混编时的问题
- ArcEngine 清除影像黑边
- ENVI\IDL 重采样 栅格单元大小设置
- shapefile转换evf 时岛的处理办法
- IGraphicsContain 删除元素
- 数据修正
- ENVI 监督分类Max stdev from Mean 参数IDL中的设置
- C#获取项目程序及运行路径的方法
- c# 中ref 和out的区别
- Eclipse生成javadoc
- C# 插件开发学习实例
- C# Console.Read()和Console.ReadLine()的区别
- 基于ArcGIS Engine编写的ColorRamp对栅格渲染代码