Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Control.List(nRow [, nCol])[ = cChar]
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00501757
Message ID:
00501766
Views:
21
>>I am still working on the listbox using array. I need to find what row the listbox is SELECTED. The listbox can vary with number of rows and upon clicking on the listbox, I need to know what row it is, so I can do the following:
>>
>>=SEEK(ThisForm.laSQL[1,1],"org","main")
>>
>>But the [1,#] is what I need to find/fill-in the value to find the actual record in the real table.
>>
>>I hope my English is readable here?
>>
>>Chuck
>
>Chuck,
>
>Ok, let's continue... :) BTW, did you get the file I sent you?
>
>In order to find out, which item you select, the only known way (for me) is to loop through list items to check, if the item is selected, e.g.:
>
>
local lnI, lnValue
>with thisform.List1
>for lnI=1 to .ListCount
>   if .selected(m.lnI)=.t. && This item is selected
>      **
>      lnValue=.List[m.lnI] && Save the value
>      exit
>   endif
>next
>
>HTH

Oops, I was incorrect. According to Help file, it's much simpler:
? List(MyList.ListIndex)
See Help on ListIndex. I was thinking about multiselect listbox...
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform