Question [Résolu]Récupération d'une sélection combobox

Plus d'informations
il y a 14 ans 9 mois #10048 par olivia
Bonjour,

je souhaiterais pouvoir récupérer ma sélection d'une combobox, quand je fais : [code:1] $combobox_ville.selectedindex[/code:1]

Celui-ci ne me récupère pas la valeur de ma sélection.


merci


olivia<br><br>Message édité par: sam87, à: 22/08/11 14:35

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 14 ans 9 mois #10052 par Richard Lazaro
Bonjour olivia,

Utilises-tu du Winform ou du WPF ?

Bien Cordialement,
Richard Lazaro.

Think-MS : (Get-Life).Days | %{ Learn-More }

\\&quot;Problems cannot be solved by the same level of thinking that created them.\\&quot; - Albert Einstein

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 14 ans 9 mois #10054 par Richard Lazaro
Chez moi cela fonctionne trés bien :

[code:1]$DropDown.add_SelectedValueChanged({
$DropDownLabel.Text = $DropDown.SelectedItem
})[/code:1]

Donc sans le code, je ne peux pas plus t'aider ^^
ps : $DropDown est un objet System.Windows.Forms.ComboBox

Bien Cordialement,
Richard Lazaro.

Think-MS : (Get-Life).Days | %{ Learn-More }

\\&quot;Problems cannot be solved by the same level of thinking that created them.\\&quot; - Albert Einstein

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 14 ans 9 mois #10059 par olivia
Re,
voici mon code : [code:1]
$combobox_ville.add_SelectedValueChanged({
$ville = $combobox_ville.selecteditem
if( $ville -eq \&quot;Sarcelles\&quot;«»)
{
$lbl_bureau.enabled = $true
$textbox_bureau.enabled = $true
}
}) [/code:1]

Mais celui ne fonctionne toujours pas , en tout cas il ne récupère rien.<br><br>Message édité par: sam87, à: 17/08/11 15:38

Connexion ou Créer un compte pour participer à la conversation.

Plus d'informations
il y a 14 ans 8 mois #10096 par olivia
Bonjour,

cela fonctionne j'avais oublié de mettre directement dans la fonction $combobox_ville.add_SelectedValueChanged({}), l'instruction a faire .

Connexion ou Créer un compte pour participer à la conversation.

Temps de génération de la page : 0.038 secondes
Propulsé par Kunena