Home Forums ActiveX components Other ActiveX components How do I dynamically add and removing items to and from a list?

Viewing 1 post (of 1 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #43355 |

    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)

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.