bonjour voila j'ai un gros souci avec la visibilité de mes combobox
le probleme est que lorsque j'en passe une des deux en false elle ne disparait pas !
voila le code :
ce bout de code est dans un SelectedIndexChanged d'une autre combo
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30 Dim parc As New ComboBox parc.Parent = list_art parc.Location = New System.Drawing.Point(65, 65) parc.Size = New System.Drawing.Point(182, 21) parc.Items.Clear() parc.Visible = False Dim obus As New ComboBox obus.Parent = list_art obus.Location = New System.Drawing.Point(65, 65) obus.Size = New System.Drawing.Point(182, 21) obus.Items.Clear() obus.Visible = False Dim MySQLCmd As String = "SELECT t_parc.parc_numero, t_oxygene_obus.obus_numero_lot FROM t_interventions_article_tampons LEFT JOIN t_parc ON t_parc.parc_id = t_interventions_article_tampons.parc_id LEFT JOIN t_oxygene_obus ON t_oxygene_obus.obus_id = t_interventions_article_tampons.obus_id WHERE t_interventions_article_tampons.art_id = '" & art_comb.Tag(art_comb.SelectedIndex) & "'" Dim reader As MySqlDataReader Dim cmd As New MySqlCommand(MySQLCmd, Connection) reader = cmd.ExecuteReader() While reader.Read If reader.IsDBNull(0) = False Then 'MsgBox(reader.GetString(0)) parc.Items.Add(reader.GetString(0)) parc.Visible = True ElseIf reader.IsDBNull(1) = False Then 'MsgBox(reader.GetString(1)) obus.Items.Add(reader.GetString(1)) obus.Visible = True End If End While reader.Close()
donc a chaque changeent je repasse les deux en false puis je fait un true sur celle qu'il faut afficher mais cela ne marche pas.
quelqu'un peut m'aider ?
Partager