I get an item text using
SomeVar = CheckLB.GetItemText(.SelectedItem)
Now I want to manipulate "SomeVar" then move the new value back into the
item it was taken from. I can't seem to find the method to change the items
text.
Thanks for any assistance,
Kevin
Tim Wilson - 25 Feb 2005 20:15 GMT
Just use the Items collection and the appropriate index.
Dim selectedIndex As Integer
Dim selectedItemText As String
selectedIndex = Me.CheckedListBox1.SelectedIndex
selectedItemText = Me.CheckedListBox1.Items.Item(selectedIndex).ToString()
selectedItemText += " modified"
Me.CheckedListBox1.Items.Item(selectedIndex) = selectedItemText

Signature
Tim Wilson
.Net Compact Framework MVP
> I get an item text using
> SomeVar = CheckLB.GetItemText(.SelectedItem)
[quoted text clipped - 5 lines]
> Thanks for any assistance,
> Kevin
Herfried K. Wagner [MVP] - 25 Feb 2005 20:29 GMT
Kevin,
"kevininstructor@state.or.us" <Kevin.S.Gallagher@state.or.us> schrieb:
>I get an item text using
> SomeVar = CheckLB.GetItemText(.SelectedItem)
[quoted text clipped - 3 lines]
> items
> text.
\\\
With Me.CheckedListBox1
.Items(.SelectedIndex) = .GetItemText(.SelectedItem) & " (!)"
End With
///

Signature
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
kevininstructor@state.or.us - 28 Feb 2005 14:13 GMT