Added logic to eliminate mouse_up response on a tree after a node is expanded
Added Mouse_down event handler to reset ExpandingTree variable.
This commit is contained in:
parent
7eded680a7
commit
33fc77ca02
@ -713,6 +713,7 @@ namespace VEPROMS
|
|||||||
this.tv.Size = new System.Drawing.Size(30, 474);
|
this.tv.Size = new System.Drawing.Size(30, 474);
|
||||||
this.tv.TabIndex = 1;
|
this.tv.TabIndex = 1;
|
||||||
this.tv.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tv_MouseUp);
|
this.tv.MouseUp += new System.Windows.Forms.MouseEventHandler(this.tv_MouseUp);
|
||||||
|
this.tv.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tv_MouseDown);
|
||||||
this.tv.SectionShouldClose += new Volian.Controls.Library.vlnTreeViewSectionInfoEvent(this.tv_SectionShouldClose);
|
this.tv.SectionShouldClose += new Volian.Controls.Library.vlnTreeViewSectionInfoEvent(this.tv_SectionShouldClose);
|
||||||
this.tv.WordSectionDeleted += new Volian.Controls.Library.WordSectionDeletedEvent(this.tv_WordSectionDeleted);
|
this.tv.WordSectionDeleted += new Volian.Controls.Library.WordSectionDeletedEvent(this.tv_WordSectionDeleted);
|
||||||
this.tv.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tv_BeforeExpand);
|
this.tv.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.tv_BeforeExpand);
|
||||||
|
@ -879,8 +879,17 @@ namespace VEPROMS
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
|
void tv_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||||
|
{
|
||||||
|
_ExpandingTree = false;
|
||||||
|
}
|
||||||
void tv_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
|
void tv_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
|
||||||
{
|
{
|
||||||
|
if (_ExpandingTree)
|
||||||
|
{
|
||||||
|
_ExpandingTree = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (e.Button != MouseButtons.Right)
|
if (e.Button != MouseButtons.Right)
|
||||||
{
|
{
|
||||||
Point newPoint = new Point(e.X, e.Y);
|
Point newPoint = new Point(e.X, e.Y);
|
||||||
@ -925,8 +934,11 @@ namespace VEPROMS
|
|||||||
tmrAutomatic.Enabled = false; // Timer has now fired
|
tmrAutomatic.Enabled = false; // Timer has now fired
|
||||||
RunAutomatic();
|
RunAutomatic();
|
||||||
}
|
}
|
||||||
|
private bool _ExpandingTree=false;
|
||||||
private void tv_BeforeExpand(object sender, TreeViewCancelEventArgs e)
|
private void tv_BeforeExpand(object sender, TreeViewCancelEventArgs e)
|
||||||
{
|
{
|
||||||
|
_ExpandingTree = true;
|
||||||
|
Volian.Base.Library.vlnStackTrace.ShowStackLocal("tv_BeforeExpand", 3);
|
||||||
VETreeNode tn = ((VETreeNode)e.Node);
|
VETreeNode tn = ((VETreeNode)e.Node);
|
||||||
tn.LoadingChildrenDone += new VETreeNodeEvent(tn_LoadingChildrenDone);
|
tn.LoadingChildrenDone += new VETreeNodeEvent(tn_LoadingChildrenDone);
|
||||||
tn.LoadingChildrenMax += new VETreeNodeEvent(tn_LoadingChildrenMax);
|
tn.LoadingChildrenMax += new VETreeNodeEvent(tn_LoadingChildrenMax);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user