Valhalla Legends Archive

Programming => General Programming => Visual Basic Programming => Topic started by: FuzZ on April 01, 2004, 10:03 AM

Title: ListView Subitem not removing [VB]
Post by: FuzZ on April 01, 2004, 10:03 AM
Well, only sometimes does this happen but my Lag icon which is a SubItem on the ListView are not always properly removed when it removes the item. (excuse my ignorance on listviews, i don't completely understand them yet.)
Example:
(http://www.bloodynub.com/files/index.php?dir=bnet%2Fbots%2Fowns%2F&file=owns-v1-13.jpg)
It's even worse in this one that I just took
(http://www.bloodynub.com/files/index.php?dir=bnet%2Fbots%2Fowns%2F&file=owns-v1-13_2.jpg)

This happened last night when we were getting floodbotted
Sometimes it's even worse with the latter of the entire list messed up with different lag icons. And, I noticed in that picture it's not even lined up correctly. If you need code, just ask.
Title: Re:ListView Subitem not removing [VB]
Post by: Puzzle on April 01, 2004, 11:52 AM

frmMain.lwRoomUsers.ListItems.Remove (frmMain.lwRoomUsers.FindItem(User).Index)

If that doesn't help then post some code.
Title: Re:ListView Subitem not removing [VB]
Post by: Gangz on April 01, 2004, 12:04 PM
Did you make sure you have it removing the whole line instead of split it and trying to remove both?
Title: Re:ListView Subitem not removing [VB]
Post by: Eli_1 on April 01, 2004, 01:34 PM
This happens to me sometimes. Another thing similar to this that happens is all the icons for a certain client will tweak out and appear different. I don't know why this happens but if you drag the bot past the side of the screen and bring it back, it will look right again :P
Title: Re:ListView Subitem not removing [VB]
Post by: Stealth on April 01, 2004, 02:00 PM
I don't quite remember how I fixed this, so long ago. Many releases ago I had this problem, I believe it was solved by .Refreshing the listview. Try it and let me know.

'pseudocode
Listview.Enabled = False
'add/remove user
Listview.Refresh
Listview.Enabled = True


You may have to switch the Enabled and Refresh calls.
Title: Re:ListView Subitem not removing [VB]
Post by: FuzZ on April 01, 2004, 03:53 PM

Public Sub DelNick(ByVal strNick)
   frmBNet.lstNicks.ListItems.Remove .FindItem(strNick).Index
End Sub


I haven't experienced anything with client icons...yet.. lol
I'll try that stealth, thanks..
Edit-> So far it seems to be working, but I haven't been in a real high traffic channel yet.. probably just gonna have to wait to check that end of it out.

Sorry it took me so long but I've been working on adding BNLS for war3, which also i'm having trouble with but that's another story :P