显示 ContextMenuStrip 后清除项目
我想在 ContextMenuStrip 显示后立即清除这些项目。但是,当我进行以下调用时,ContextMenuStrip 一开始就没有正确显示。有什么想法吗?
ContextMenuStrip.Show()
ContextMenuStrip.Items.Clear();
谢谢,
I wanted to clear the items just after the ContextMenuStrip is shown. However when I was making the following calls, ContextMenuStrip didn't show properly in the first place. Any ideas?
ContextMenuStrip.Show()
ContextMenuStrip.Items.Clear();
Thanks,
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请忽略此线程。
我应该处理 ContextMenuStrip.Closing 事件并将 ContextMenuStrip.Items.Clear() 放在里面来完成这项工作。
谢谢,
Please disregard this thread.
I should handle ContextMenuStrip.Closing event and put ContextMenuStrip.Items.Clear() inside to do the job.
Thanks,