Create a blank VB project and add three controls to it:
– A button with the name btnAdd.
– A button with the name btnRemove.
– An edit control with the name txtNewItem
– A SmartUI control called SmartUI1
Then, in the button add event, you can use the following code to add an item to the list:
Private Sub btnAdd_Click() SmartUI1.SmartItems.Add , , txtNewItem.Text, ListItemFullRow End Sub
Private Sub btnRemove_Click() If Not SmartUI1.SelectedItem Is Nothing Then SmartUI1.SmartItems.Remove (SmartUI1.SelectedItem.Index) End If End Sub |
Applies to Xceed SmartUI (ActiveX). Imported from legacy forums. Posted by Xceed admin (had 1477 views)