Private Sub ChoiceBox_MousePressed (EventData As MouseEvent) 'ChoiceBox is the eventname set for your Choicebox(es)
If Sender = cbNewRecordTag Then 'Create data for this Choicebox if you have multiple choice boxes, set the eventnames the same and select the currently clicked one here
Dim JO As JavaObject = Sender
If JO.RunMethod("isShowing",Null) = False Then 'Only populate new data if the Choicebox is opening
cbNewRecordTag.Items.Clear 'Clear existing entries
For Each Item As String In MineXML1.NonDataMap.Keys 'Populate the choices
cbNewRecordTag.Items.Add(Item)
Next
End If
End If
End Sub