Description
To remove the item from combo box control, this function overloads 2 variants like the following :
Public Overloads Sub RemoveItem(ByVal index As Integer)Public
Public Overloads Sub RemoveItem(ByVal values As List(Of Integer))
Parameters
Parameter |
Description |
index |
Index of the item to be removed |
values |
List of the index to remove them from the combobox |
Note We recommended using the second overloads method for better performance.
Sample
Public Sub main()
Dim com As new VTLGeneral.VTLControls.CChartObjectCombo("com1")
Dim frm As new VTLGeneral.VTLForm("form1")
Dim lstdata As New List(Of String)
Dim lstRemovedata As New List(Of integer)
Dim lbl As VTLGeneral.VTLControls.CChartObjectLabel
Dim com2 As new VTLGeneral.VTLControls.CChartObjectCombo("com2")
lbl= new VTLGeneral.VTLControls.CChartObjectLabel("b1")
Dim btn As VTLGeneral.VTLControls.CChartObjectButton
btn= new VTLGeneral.VTLControls.CChartObjectButton("btn1")
frm.AddVTLControl(lbl)
frm.AddVTLControl(btn)
frm.AddVTLControl(com)
frm.AddVTLControl(com2)
frm.show()
frm.Width = "8130"
btn.Width = "5100"
com2.Top = "2160"
com2.Left = "3240"
lstdata.Add("text1")
lstdata.Add("text2")
lstdata.Add("text3")
com.AddItem("text1")
com.AddItem("text2")
com.AddItem("text3")
com2.AddItem(lstdata)
lstdata.Clear()
lstRemovedata.add(2)
lstRemovedata.add(3)
com2.RemoveItem(lstRemovedata)
End Sub
See Also
Back to VTL Server Script Index
|