Valhalla Legends Forums Archive | .NET Platform | ListView question

AuthorMessageTime
iNsaNe
This has somewhat to do with bot development

What properties do I need to set to have my listview display one user (item) per line, have vertical scrollbars ONLY, and have a second column (not sure if it actually is another column) that shows another image (example: latency)

(so that it looks like the Starcraft channel list)
October 3, 2008, 11:46 PM
Myndfyr
You'd want to use owner-drawn listviews.

http://msdn.microsoft.com/en-us/library/system.windows.forms.listview.drawitem(VS.80).aspx

I personally use a ListBox instead of a ListView but it's a matter of preference.
October 4, 2008, 12:32 AM
iNsaNe
Thanks lol but one last question, sort of a beginner question too.

How do I make it so when I scroll the listbox (I changed to a listbox, you are right it is much easier) the images dont flicker. Like microsoft said, override DoubleBuffer but I'm not sure how? I'm doing this in C#
October 4, 2008, 5:59 AM
Myndfyr
listBox.DoubleBuffered = true;
October 4, 2008, 7:15 AM
BreW
Override double buffering? It's never enabled by default. You'd have to either send an LVM_SETEXTENDEDLISTVIEWSTYLE message with LVS_EX_DOUBLEBUFFER as the style and mask, or (i guess) do it the way myndfyre said.

To display a listview the way starcraft does is extremely simple. Use the style LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SINGLESEL, and set LVS_EX_SUBITEMIMAGES as well (yes, it is a seperate column).
If you want your listview to have no horizontal scroll bar, check out ShowScrollBar().

Really, you should stick with a listview. It makes for less work and a more professional looking application in the end.
October 4, 2008, 12:11 PM
dRAgoN
As I remember the latest (going from when I last looked) listview control you can only have 1 image in the inital column and thats all, I remember haveing to build my own controll for my user list.
if I ever get back into this sort of crap again ill probably go with the listbox also.
October 4, 2008, 7:14 PM
Myndfyr
[quote author=brew link=topic=17684.msg180048#msg180048 date=1223122263]
Override double buffering? It's never enabled by default. You'd have to either send an LVM_SETEXTENDEDLISTVIEWSTYLE message with LVS_EX_DOUBLEBUFFER as the style and mask, or (i guess) do it the way myndfyre said.

To display a listview the way starcraft does is extremely simple. Use the style LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_SINGLESEL, and set LVS_EX_SUBITEMIMAGES as well (yes, it is a seperate column).
If you want your listview to have no horizontal scroll bar, check out ShowScrollBar().

Really, you should stick with a listview. It makes for less work and a more professional looking application in the end.
[/quote]
This is the .NET forum.  Everything you described in this post has object-oriented APIs in .NET.
October 5, 2008, 8:25 AM
BreW
[quote author=MyndFyre[vL] link=topic=17684.msg180071#msg180071 date=1223195147]
This is the .NET forum.  Everything you described in this post has object-oriented APIs in .NET.
[/quote]
So you mean a .NET developer can't use the powerful Win32 API just as well, or is less effective when using it? That must suck.
October 5, 2008, 12:35 PM
dRAgoN
[quote author=brew link=topic=17684.msg180072#msg180072 date=1223210142]
[quote author=MyndFyre[vL] link=topic=17684.msg180071#msg180071 date=1223195147]
This is the .NET forum.  Everything you described in this post has object-oriented APIs in .NET.
[/quote]
So you mean a .NET developer can't use the powerful Win32 API just as well, or is less effective when using it? That must suck.
[/quote]
Can use Win32 as much as we want, he's trying to tell you everything can mostly be done otherways in .NET.
October 5, 2008, 10:03 PM
Barabajagal
Brew likes reinventing the wheel.
October 5, 2008, 10:41 PM
dlStevens
[quote author=Andy link=topic=17684.msg180075#msg180075 date=1223246502]
Brew likes reinventing the wheel.
[/quote]

[img]http://bp0.blogger.com/_OroNfSICBo4/SDQsU9yL9gI/AAAAAAAAAlQ/mUMwC9Bcofc/s400/square+wheel.jpg[/img]
Brew, age 9.
October 6, 2008, 12:51 AM
BreW
It's hip to be square.
October 6, 2008, 2:06 AM

Search