I have a Textbox with a DropDownEditorButton that is related to a ultraTree.
I need to make the ultraTree appear once it receives the focus, as if I had clicked on DropDownEditorButton
I discovered the problem inadvertently. The following code in my form's Activated event caused the error to happen:
If Me.appAbasOpcoes.SelectedTab.Index = 0 Then Me.txtNDocReceita.Focus () Me.appAbasOpcoes.SelectedTab.Index = 1 Then ElseIf Me.txtNDocDespesa.Focus () Me.appAbasOpcoes.SelectedTab.Index = 2 Then ElseIf Me.txtContaOrigemTransferencia.Focus () end If
at any time the method that populates the tree is called. And the error points to "ddeb.DropDown ()" in AfterEnterEditMode.
That error message clearly indicates that your code is trying to add a node to the tree with a key that is a duplicate of a node that already exists.
ERROR: "An item with the same key has already been added"
AfterEnterEditMode seems like the best event to use.
What's the error?