Welcome![Sign In][Sign Up]
Location:
Search - winform treeview checkbox

Search list

[TreeViewCSharp-winform-TreeView

Description: C# winform TreeView中关于checkbox选择的完美类-C# winform TreeView checkbox selected on the perfect class
Platform: | Size: 104448 | Author: zheng | Hits:

[CSharpTreeViewEx

Description: 一个WinForm的TreeView,某node的CheckBox初始状态为false,当双击这个node的checkbox时,会出现很奇怪的情况: 第一次双击checkbox,checkbox显示的状态会切换两次状态,unchecked-> checked-> unchecked,而AfterCheck事件仅触发一次,在AfterCheck事件中获取到的checkbox状态为checked。在这里checkbox状态已经和显示状态不一致了 以后每次双击,checkbox显示的状态会出现一次切换,AfterCheck也会触发一次,并且checkbox显示的状态和值的状态仍然保持相反。 除上面这个问题外,还有一点,当双击treeview 的checkbox后,如果再去单击或双击该界面中除这个treeview外的任何部分,系统会忽略第一次点击事件。举例来说,一个窗口中,有一个treeview,还有一个ok按钮,当我双击这个treeview的一个checkbox后,再去点那个ok按钮,第一次点击是没有任何作用的,第二次以及以后的点击才会有效,包括点击最大化,最小化,以及关闭这种系统按钮。 为了解决以上问题,我重写了TreeView控件,在不影响其它地方的前提下,能很好的解决以上问题。我的环境:.Net framework4.0 + VS2005 + Win7 编译通过,并付执行程序。- A WinForm TreeView, the the CheckBox initial state of a node is false, when you double-click a checkbox of this node, there will be a very strange situation: The first double-click a checkbox and a checkbox to display the status switch twice state, unchecked-> checked-> unchecked, and AfterCheck events only trigger once, the AfterCheck event to the checkbox state to checked. Checkbox state and display the status inconsistency Every time you double-click a checkbox to display the status once switch AfterCheck will trigger and the state of the checkbox to display the status and value remains the contrary. In addition to the above problem, another thing, when double-clicking the treeview s checkbox, if you go to click or double-click any part of the interface, in addition to this treeview, the system will ignore the click event for the first time. For example, a window, a treeview, an ok button, when I double-click the treeview with a checkbox, go to the point that ok button,
Platform: | Size: 66560 | Author: kevin | Hits:

CodeBus www.codebus.net