hy_honey
Messages postés67Date d'inscriptionlundi 9 mai 2005StatutMembreDernière intervention 8 août 2005
-
3 août 2005 à 16:54
rabeb83
Messages postés2Date d'inscriptionjeudi 23 novembre 2000StatutMembreDernière intervention 8 août 2005
-
8 août 2005 à 10:59
salut a tous je cherche a affiché 2 colone dans une liste boxe je suis en vb6.net et je sais pas trop coment faire le code que j'ai fais me récupere seulement une seul colonne et je sais pas se que je doit changer si quelqu'un peu m'aider voici mon code merci
nhervagault
Messages postés6063Date d'inscriptiondimanche 13 avril 2003StatutMembreDernière intervention15 juillet 201137 3 août 2005 à 20:00
Salut
Private Sub button1_Click(sender As Object, e As System.EventArgs)
' Create an instance of the ListBox.
Dim listBox1 As New ListBox()
' Set the size and location of the ListBox.
listBox1.Size = New System.Drawing.Size(200, 100)
listBox1.Location = New System.Drawing.Point(10, 10)
' Add the ListBox to the form.
Me.Controls.Add(listBox1)
' Set the ListBox to display items in multiple columns.
listBox1.MultiColumn = True
' Set the selection mode to multiple and extended.
listBox1.SelectionMode = SelectionMode.MultiExtended
' Shutdown the painting of the ListBox as items are added.
listBox1.BeginUpdate()
' Loop through and add 50 items to the ListBox.
Dim x As Integer
For x = 1 To 50
listBox1.Items.Add("Item " & x.ToString())
Next x
' Allow the ListBox to repaint and display the new items.
listBox1.EndUpdate()
' Select three items from the ListBox.
listBox1.SetSelected(1, True)
listBox1.SetSelected(3, True)
listBox1.SetSelected(5, True)
' Display the second selected item in the ListBox to the console.
System.Diagnostics.Debug.WriteLine(listBox1.SelectedItems(1).ToString())
' Display the index of the first selected item in the ListBox.
System.Diagnostics.Debug.WriteLine(listBox1.SelectedIndices(0).ToString())
End Sub
Pourquoi tu n'utilises pas de datagrid c'est mieux pour faire ce que tu veux je pense.
rabeb83
Messages postés2Date d'inscriptionjeudi 23 novembre 2000StatutMembreDernière intervention 8 août 2005 8 août 2005 à 10:59
je veux afficher un tableau dans mon interface vb qui contient les élèments d'une table d'une base access,j'ai utillisé in datagrid mais elle ne fonctionne pas ,je ne sais pas quel est le problème,svp aidez moi avec un code et merci