C# 4.0 Devexpress树列表状态图像索引编辑属性
我有一个devexpress树列表控件,它附加了一些父节点和子节点 所有父节点和子节点都有复选框,即其状态图像索引设置为1 当我在应用程序中打开树列表时,我无法更改状态图像索引,也无法取消选中该复选框 在附加的图像中,这些是父节点和必须根据需要编辑的复选框C# 4.0 Devexpress树列表状态图像索引编辑属性,c#-4.0,C# 4.0,我有一个devexpress树列表控件,它附加了一些父节点和子节点 所有父节点和子节点都有复选框,即其状态图像索引设置为1 当我在应用程序中打开树列表时,我无法更改状态图像索引,也无法取消选中该复选框 在附加的图像中,这些是父节点和必须根据需要编辑的复选框 private void treeListSuite_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Left
private void treeListSuite_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Left)
{
TreeListHitInfo treeInfo = ((TreeList)sender).CalcHitInfo(new Point(e.X, e.Y));
TreeListNode oTreeNode = treeInfo.Node;
if (treeInfo.HitInfoType == HitInfoType.StateImage)
{
if (oTreeNode.StateImageIndex != -1)
{
if (oTreeNode.StateImageIndex == 0)
{
oTreeNode.StateImageIndex = 1;
}
else
{
oTreeNode.StateImageIndex = 0;
}
}
}
}
}