Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting an item from a list box
Message
De
26/01/2004 08:47:33
 
 
À
25/01/2004 20:57:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00870446
Message ID:
00870529
Vues:
13
Hi Randy,

I don't know what your rowsource is. Is it an array? If an array, it would just be something similar to thisform.myarray (if myarray is a form property and it was created as myarray[1] or something similar) and the rowsourcetype would be 5 - Array. It looks like Cetin answered your question for arrays.

Here is an example where I use a rowsourcetype of 6 - Fields and the listbox's rowsource is control.cn_name:
FOR nCnt = 1 TO THISFORM.lstMcn_name.LISTCOUNT
    IF THISFORM.lstMcn_name.SELECTED(nCnt)  && Is item selected?
	SELECT CONTROL
	IF RTRIM(CONTROL.cn_name)!=RTRIM(THISFORM.lstMcn_name.LIST(nCnt))
	    SEEK RTRIM(THISFORM.lstMcn_name.LIST(nCnt))
>Tracy, good to hear from you. I am still confused!
>
>OK, I find the target item with your loop. Let's say that I want to store it to a variable:
> myvariable = ?????
>
>Also, what would my Row Source be: myarray[1] ????
>
>I guess that I have never done this particular aspect of Fox before. Psychological avoidance?
>
>Thanks, Randy
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform