文件名称:TreeViewEx

  • 所属分类:
  • C#编程
  • 资源属性:
  • [Windows] [Visual.Net] [源码]
  • 上传时间:
  • 2012-11-26
  • 文件大小:
  • 65kb
  • 下载次数:
  • 0次
  • 提 供 者:
  • ke***
  • 相关连接:
  • 下载说明:
  • 别用迅雷下载,失败请重下,重下不扣分!

介绍说明--下载内容均来自于网络,请自行研究使用

一个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 fr a mework4.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,
(系统自动生成,下载前可以参看下载内容)

下载文件列表

TreeViewEx

..........\testTreeView

..........\testTreeView.sln

..........\testTreeView.suo

..........\............\bin

..........\............\...\Debug

..........\............\...\.....\testTreeView.exe

..........\............\...\.....\testTreeView.pdb

..........\............\...\.....\testTreeView.vshost.exe

..........\............\...\Release

..........\............\...\.......\testTreeView.exe

..........\............\...\.......\testTreeView.pdb

..........\............\...\.......\testTreeView.vshost.exe

..........\............\Form1.cs

..........\............\Form1.Designer.cs

..........\............\Form1.resx

..........\............\obj

..........\............\...\Debug

..........\............\...\.....\TempPE

..........\............\...\.....\testTreeView.csproj.GenerateResource.Cache

..........\............\...\.....\testTreeView.exe

..........\............\...\.....\testTreeView.Form1.resources

..........\............\...\.....\testTreeView.pdb

..........\............\...\.....\testTreeView.Properties.Resources.resources

..........\............\...\Release

..........\............\...\.......\TempPE

..........\............\...\.......\testTreeView.csproj.GenerateResource.Cache

..........\............\...\.......\testTreeView.exe

..........\............\...\.......\testTreeView.Form1.resources

..........\............\...\.......\testTreeView.pdb

..........\............\...\.......\testTreeView.Properties.Resources.resources

..........\............\...\testTreeView.csproj.FileListAbsolute.txt

..........\............\Program.cs

..........\............\Properties

..........\............\..........\AssemblyInfo.cs

..........\............\..........\Resources.Designer.cs

..........\............\..........\Resources.resx

..........\............\..........\Settings.Designer.cs

..........\............\..........\Settings.settings

..........\............\testTreeView.csproj

..........\............\TreeViewEx.cs

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度更多...
  • 请直接用浏览器下载本站内容,不要使用迅雷之类的下载软件,用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.

相关评论

暂无评论内容.

发表评论

*主  题:
*内  容:
*验 证 码:

源码中国 www.ymcn.org