在对annotation做了操作以后,需要用cell.Refresh();刷新单元格,这样显示的图像才会变化
这里是给开发包里C:\LEADTOOLS 20\Examples\DotNet\CS\MedicalViewerDemo中的MainFrom窗口加了一个复选框,
- private void checkBox1_CheckedChanged(object sender, EventArgs e)
- {
- foreach (MedicalViewerCell cell in Viewer.Cells)
- {
- if (cell.Selected)
- {
- foreach (Leadtools.Annotations.Engine.AnnObject obj in cell.AutomationContainer.Children)
- {
- obj.IsVisible = checkBox1.Checked;
- }
- cell.Refresh();
- }
- }
- }
复制代码 |