[Closed] Problems with DotNet ListView .topItem property
Anyone ever have problems trying to set the .topItem property of a DotNet listView? I have two seperate listviews, one is a simple example, and it works just fine. But on my more complicated listview, I can make it scroll up by setting the .topItem, but I can’t make it scroll down.
Anyone else experience this (or better yet, have a workaround)?
stupid question time: is it already scrolled all the way at the bottom, making it impossible for the item you want to be at the top… to actually be at the top?
also – and this is just off some random google result – try setting it twice… o_O
Richard,
Those are good thoughts, but neither panned out. On the bright side, as long as I have one simple example where it works properly, and one complicated one where it doesn’t, theoretically I should be able to systematically dismantle the complicated example until it’s just like the simple one, and at some point it should start working and I’ll know where the problem is. Gonna be quite a bit of work, though…
Thanks!
Ok, after much tinkering I found the problem. Silly me thought that if Microsoft builds a DotNet ListView and gives you the ability to set the .text property of the subItems in each item, that you should be able to set it to whatever you want. But NOOOOOO, if you happen to make the .text property of any of the subItems in the first column (subItem index 0) to be “”, then you can’t set the .topItem property of the listview properly.
I guess the blame really lies with me thinking that programming aught to be logical.