Author | Message | Time |
---|---|---|
Yegg | I have a problem with my channel list for my CSB bot, my channel list (its listview) shows all the usernames, but, it shows them so that they are all scrambled. The names r over-lining eachother and going in all kidns of weird directions, longer names take up 3 lines. I think this only happens because i made my bot not to recognize icons. Any one know wut to do to help me? (i can show u the needed code if u need it to help me) | September 14, 2004, 9:17 PM |
Networks | Make your channellist longer or wider and maybe show us some code? Maybe your column header is to small? | September 14, 2004, 10:27 PM |
Myndfyr | Have you successfully added items to your list in design-time mode? If not, there's a problem with your properties in design that have nothing to do with any code whatsoever. I would look into that first. | September 14, 2004, 11:12 PM |
LordNevar | When you scroll through your channellist do the names fix? | September 14, 2004, 11:23 PM |
Yegg | No scrolling through them does not fix the problem. Ok, hers my code for users alread in a channel: [code]Private Sub CleanSlateBot1_UserInChannel(ByVal username As String, ByVal flags As Long, ByVal Message As String, ByVal Ping As Long, ByVal Product As String, StatUpdate As Boolean, SimulatedEvent As Boolean) strJSTR = Product strSexp = Product strSTAR = Product strd2 = Product strD2XP = Product strW2BN = Product strw3 = Product strDiablo = Product Dim icon As Integer Dim lagicoN As Integer If icon = ICON_GAVEL Then With Form1.lvChannel.ListItems.Add(1, username, username, , icon) .ListSubItems.Add lvChannel.FindItem(username).Index, , , lagicoN End With End If If icon <> ICON_GAVEL Then With Form1.lvChannel.ListItems.Add(, , username, , icon) .ListSubItems.Add , , , lagicoN End With End If Label2 = lvChannel.ListItems.Count End Sub[/code] Im not sure what im doing wrong but im sure its a code problem now, because now (after i tried fixing something) my channel list if blank, and if i randomly click around it, I can see a users name. Any1 know wut i do now? (I don't think the channellists size should matter, but i did make it pretty small, like flawed bot) [color=#8080FF]Added [ code ] tags. - Spht[/color] | September 15, 2004, 12:02 AM |
LordNevar | Try adding this Form1.lvChannel.Refresh at the end of your code. | September 15, 2004, 1:01 AM |
Stealth | While that is a horribly-written piece of code, I would venture a guess that the problem lies with your ListView properties. Click on it and press SHIFT+F4, and look for options that might be set incorrectly. Edit: Didn't see MyndFyre's post. Apparently you didn't, either. | September 15, 2004, 1:53 AM |
Networks | I am thinking the simplest way to deal with this is to delete the listview your using and create a new one by dragging and dropping it from the toolbar to the form and setting the properties yourself. I am sure this will work. | September 15, 2004, 1:57 PM |
LivedKrad | Learn properties. [Note: I want NO REPLIES FROM STEALTH TO MY RESPONSE!] | September 15, 2004, 10:51 PM |
Yegg | Ok, i did what networks said to do, i just re-created my listview, which that allowed me to see the users in the channel again, only they're stil all over the place, the usernames r scrambled everywhere, and im sure that my listview's properties r correct, bcuz i copied them from my old bot. So for now if ne1 thinks something is nwrong with my code or stil something wrong with the properties, you can help, if i figure the problem out, i'll reply back. | September 15, 2004, 11:04 PM |
LivedKrad | First of all, you need to set the view to Report. Something required for report however, is a column. Try right clicking on the listview and selecting Properties. Go over to 'Column Headers', (or whatever it's called), and add a column. Unless you're able to create an owner drawn listbox, I'd just set the column to about 200-300 less than the width of the listview. As long as you do not attempt to set it is Icon or Small Icon, I do not forsee a problem after taking these steps. | September 15, 2004, 11:09 PM |