Microsoft KB Archive/215388

= BUG: AfterLabelEdit Event Fires After Canceling an Edit =

Article ID: 215388

Article Last Modified on 8/19/2005

-

APPLIES TO


 * Microsoft Windows CE Toolkit for Visual Basic 6.0
 * Microsoft Office Keyboard

-



This article was previously published under Q215388



SYMPTOMS
When using either the Microsoft CE ListView or CE TreeView control in either a Windows CE Toolkit for Visual Basic or eMbedded Visual Basic project, the AfterLabelEdit event fires after canceling a label edit. This behavior is not consistent with Visual Basic. This event should fire only if the label has actually been changed in some fashion.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
 Create a new Windows CE project in either Visual Basic or eMbedded Visual Basic. Form1 is created by default. From the Project menu, choose Components. Select the Microsoft CE TreeView Control to add it to your toolbox. Place a TreeView control on Form1.  Paste the following code into Form1: Private Sub Form_Load TreeViewCtl1.LineStyle = tvwRootLines

Dim nodX Set nodX = TreeViewCtl1.Nodes.Add(,, "r", "Root") Set nodX = TreeViewCtl1.Nodes.Add("r", tvwChild, "child1", "Child") TreeViewCtl1.Nodes(2).EnsureVisible End Sub

Private Sub TreeViewCtl1_AfterLabelEdit(Cancel As Integer, NewString As String) MsgBox "AfterLabelEdit" End Sub

Private Sub TreeViewCtl1_BeforeLabelEdit(Cancel As Integer) MsgBox "BeforeLabelEdit" End Sub  Run the project.</li> Select the Child node for editing. Note that the BeforeLabelEdit event fires.

</li> Press the ESC key or select the parent node to cancel the edit. Note that the AfterLabelEdit event fires. This event should fire only if the label has actually been changed in some fashion.</li></ol>

Additional query words: vbce vbce6 wce wince evb

Keywords: kbbug kbtoolkit kbpending KB215388

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.