避免/跳过删除 visio 中的形状
如果形状与其他形状重叠,我想跳过删除该形状。
那么知道在哪种情况下我应该这样做吗?
我尝试使用
QueryCancelSelectionDelete(ByVal Selection As IVSelection) 来执行此操作,但我无法检测到正在删除哪个形状
I want skip deleting a shape if it overlaps with other shape.
so any idea in which event i should do this?
i tried to do that using,
QueryCancelSelectionDelete(ByVal Selection As IVSelection) but i can't detect which shape is being deleted
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Selection 对象是调用 QueryCancelSelectionDelete 时将要删除的形状的集合。除非取消删除,否则选择对象中的所有形状都将被删除。
您可以取消该事件,但不会删除任何选定的形状。
也许您可以以编程方式删除选择中您不想跳过的其他形状...
(尽管如果您尝试这样做,您必须小心,不要在事件处理程序中再次调用您您自己的删除操作...)
The Selection object is the collection of shapes that are going to be deleted when QueryCancelSelectionDelete is invoked. All of the shapes in the Selection object will be deleted unless you cancel the delete.
You can cancel the event, but then none of the selected shapes will be deleted.
Perhaps you could then programatically delete the other shapes in the selection that you didn't want to skip...
(Although if you try that, you'll have to be careful that you don't get called again in your event handler by your own delete action...)