I am trying to set up my listbox control to add data entries from a textbox using an add button. The data is getting added as a new node under my listbox control, but isn't showing up in the listbox.
<InfoPathEventHandler(MatchPath:="CTRL20_5", EventType:=InfoPathEventType.OnClick)> _
Public Sub CTRL20_5_OnClick(ByVal e As DocActionEvent)
Dim new_claim As IXMLDOMNode, claims_list As IXMLDOMNode
claims_list = thisXDocument.DOM.selectSingleNode("//my:Claims_Listbox")
'clone previous entry in listbox for formatting purposes
new_claim = claims_list.lastChild.cloneNode(True)
'update new node text with textbox text
new_claim.text = thisXDocument.DOM.selectSingleNode("//my:Claim_Description").text()
'update new node value with textbox text
new_claim.nodeValue = thisXDocument.DOM.selectSingleNode("//my:Claim_Description").text()
'remove text from textbox
thisXDocument.DOM.selectSingleNode("//my:Claim_Description").text() = ""
'append listbox with new child
claims_list.appendChild(new_claim)
'verify that number of children increases by 1 with each entry
MsgBox(claims_list.childNodes.length)
'verify that lastchild text is in fact the text that was just entered in the textbox before adding
MsgBox(claims_list.lastChild.text)
End Sub
It appears that the children are getting added correctly, is there something else I need to do to get the listbox to display these additions? (obviously there is)