List Box
-
I have the following displayed in textboxes: Price: 1.8 Quantity: 6 , and the item (pencil) relating to the purchase in a combolistbox How do i get this three bits of information in one line of a listbox: e.g 6 pencils $1.80
You should use ListView Control instead for such output. Add a ListView Control to your form then change its 'View' property to 'Details' then add columns to its Column collection according to your requirements, use the SubItems property of Listviewitem to display the data for Sub columns.
AliAmjad(MCP)
-
You should use ListView Control instead for such output. Add a ListView Control to your form then change its 'View' property to 'Details' then add columns to its Column collection according to your requirements, use the SubItems property of Listviewitem to display the data for Sub columns.
AliAmjad(MCP)
-
I am not familiar with the ListView control, would you be able to clarify or help with the listbox control
I have told you the way of setting up a ListView control according to your requirements, use Property window to add columns to your ListView Control through its Columns Property after setting these values you can use the following code to fill it:
Dim lstitm1 As New ListViewItem("Pencil") lstitm1.SubItems.Add("$11.0") 'For Price lstitm1.SubItems.Add("2") 'For Quantity Me.ListView1.Items.Add(lstitm1)
Hope it helps !
AliAmjad(MCP)
-
I have told you the way of setting up a ListView control according to your requirements, use Property window to add columns to your ListView Control through its Columns Property after setting these values you can use the following code to fill it:
Dim lstitm1 As New ListViewItem("Pencil") lstitm1.SubItems.Add("$11.0") 'For Price lstitm1.SubItems.Add("2") 'For Quantity Me.ListView1.Items.Add(lstitm1)
Hope it helps !
AliAmjad(MCP)
Works, thanks for all your help