|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now! |
|
#1
|
|||
|
|||
|
Good Afternoon, again.
Is there a way that I can select any item in my list other than the first? No matter which item I click, only the first item is in the selecteditem.text (example, I want abenddate information, I still only get jesnumber). Set objItem = lstvwUnrsGrp.ListItems.Add(, _ "I" & rstAbends("Jesnumber"), rstAbends("Jobname")) objItem.ListSubItems.Add , _ "Jes Number", rstAbends("Jesnumber") objItem.ListSubItems.Add , _ "Abend Date", rstAbends("abenddate") Private Sub lstvwUnrsGrp_ItemClick(ByVal Item As MSComctlLib.ListItem) strabend_parm = lstvwUnrsGrp.SelectedItem.Text Thanks. |
|
#2
|
|||
|
|||
|
when you use the item click event the item that is clicked is supplied as an argument. in your code above you'll see:
ByVal Item As MSComctlLib.ListItem use that to get the contents of the clicked item. Item.Text is what appears in the first column. if that isn't what you want then you need to access the sub columns: Code:
Private Sub lstvwUnrsGrp_ItemClick(ByVal Item As MSComctlLib.ListItem)
strabend_parm = Item.SubItems(2)
End Sub
the index (2) is one based and index 1 is the first sub column.
__________________
Programmer's Corner |
|
#3
|
|||
|
|||
|
Thank you so much. I'm getting tooooo much knowledge from this site!
![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > listview item selection problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|