Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Listbox default value
Message
De
13/11/2001 12:12:50
 
 
À
13/11/2001 12:06:09
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00580935
Message ID:
00580945
Vues:
15
I suppose you could add a property to your listbox class called defaultValue. Then in the init() method of the listbox class you would put this.value = this.defaultValue.

>>Would MyList.ListIndex = 1 work?
>>
>>>I have a listbox which is defaulting to values. The values are some IP addresses such as 1.1.1.1,2.2.2.2,3.3.3.3. At this point, if I run the form, the listbox default value is none. If I open the listbox, I see those three values. However, I would like the listbox to default to the first value. So, I enter 1.1.1.1 in the value property. I don't even run the form. I just save it and when I come back the value is set back to 0. What am I missing?
>
>Yes, that is working. But, would it be a way to have that at the property level? Right now, as this property is read only, I have to do ThisForm.MyListBox.ListIndex=1 in the form Init(). I guess I'm not the only one who need to default a listbox with values to a default value. I'm just wondering if there could be a way to do at the property level.
>
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform