Hello everybody. I got tired to the usual windows WC_LISTVIEW Class. All the work-arounds to subclass and draw my own controls in it
or custom-drawing it.. So I wrote this "xListView" class from scratch. It took me almost a week to get it to where I could use it in some apps for work.
My boss was fussing, by I needed it because it was SO versatile. Any ways, I'm always finding little bugs and stuff, and the Library is too big to just pop the code in, but if there is anyone out there who would like to help finish the ultimate ListView, please help out! There are a lot of Messages that I didn't have the
WndProc() handle, that are listed. There's a small example program there to show the basics of how to use it. Anyways, if anyone takes a look that would be great because there's nothing better than a spicy-hot list-view control!
http://www.giveitorsellit.com/downloadable/customlv.zip
Thanks,
Justin
xListView Class: open source need people to help perfect it!
-
- User
- Posts: 89
- Joined: Thu Feb 04, 2010 7:34 am
- Location: Decatur, TX
- Contact:
xListView Class: open source need people to help perfect it!
Last edited by JustinJack on Sat May 14, 2011 1:07 am, edited 1 time in total.
Re: xListView Class: open source need people to help perfect
Would very much like to see this, but the link is dead
.


-
- User
- Posts: 89
- Joined: Thu Feb 04, 2010 7:34 am
- Location: Decatur, TX
- Contact:
Re: xListView Class: open source need people to help perfect
Oops, yes. Microsoft just updated my dang web server and IIS is down now, have to see what happened. I'm at work now, but I'll check into it this PM an re-post the link.
Re: xListView Class: open source need people to help perfect
Still down?JustinJack wrote:Oops, yes. Microsoft just updated my dang web server and IIS is down now, have to see what happened. I'm at work now, but I'll check into it this PM an re-post the link.


-
- User
- Posts: 89
- Joined: Thu Feb 04, 2010 7:34 am
- Location: Decatur, TX
- Contact:
Re: xListView Class: open source need people to help perfect
http://www.giveitorsellit.com/downloadable/customlv.zip
Here you go!
Got it up and running, sorry was busy at work. I included a small sample program at the bottom of the customlv.pb file.
Just look through the messages defined at the top of the file
LVM_GETTEXT, I have defined messages to change color of cells selected, non-selectable, and not selected. I also have a cool search built in, so
that it you have column 2 with focus, as you type into column 2 (assuming you haven't embedded a control) it will search all column 2's for whatever text your're searching for and find that row, kind of like the WC_LISTVIEW class does for column 0 on theirs, however on this one, it doesn't search from left to right. It searches
using FindString() for any match in the columns for what's in the search buffer. I think i set the search buffer to clear after 1 sec. But check it out.
Notes:
myRetVal.s = PeekS(SendMessage_(hListView, #LVM_GETTEXT, iRow, iCol)) ;<- Gets the text in a cell
SendMessage_(hListView, #LVM_SETTEXT, MakeRowCol(iRow, iCol), *lpszText) ;<- Sets the text in a cell.
Um...
Oh and you have some cool events.
LVN_CBSELCHANGE
LVN_DOWN = If the user hits enter anytime the hListView has focus (embedded control or not) (HIWORD) wParam = Row (LOWORD) wParam = Col...lParam = hListView...This is good for creating a new Row if they are at the bottom
LVN_CBNKILLFOCUS
LVN_EDITCHANGE
The control DOES send WM_NOTIFY messages and standard NM_CLICK, NM_RCLICK, but I have it send the bulk of the LVN_ messages DIRECTLY to the parent window's WndProc(). I don't know, we could switch them to WM_COMMANDs, but I didn't bother.
just email me if you have any questions on it: justin@justinjack.com
Here you go!
Got it up and running, sorry was busy at work. I included a small sample program at the bottom of the customlv.pb file.
Just look through the messages defined at the top of the file
LVM_GETTEXT, I have defined messages to change color of cells selected, non-selectable, and not selected. I also have a cool search built in, so
that it you have column 2 with focus, as you type into column 2 (assuming you haven't embedded a control) it will search all column 2's for whatever text your're searching for and find that row, kind of like the WC_LISTVIEW class does for column 0 on theirs, however on this one, it doesn't search from left to right. It searches
using FindString() for any match in the columns for what's in the search buffer. I think i set the search buffer to clear after 1 sec. But check it out.
Notes:
myRetVal.s = PeekS(SendMessage_(hListView, #LVM_GETTEXT, iRow, iCol)) ;<- Gets the text in a cell
SendMessage_(hListView, #LVM_SETTEXT, MakeRowCol(iRow, iCol), *lpszText) ;<- Sets the text in a cell.
Um...
Oh and you have some cool events.
LVN_CBSELCHANGE
LVN_DOWN = If the user hits enter anytime the hListView has focus (embedded control or not) (HIWORD) wParam = Row (LOWORD) wParam = Col...lParam = hListView...This is good for creating a new Row if they are at the bottom
LVN_CBNKILLFOCUS
LVN_EDITCHANGE
The control DOES send WM_NOTIFY messages and standard NM_CLICK, NM_RCLICK, but I have it send the bulk of the LVN_ messages DIRECTLY to the parent window's WndProc(). I don't know, we could switch them to WM_COMMANDs, but I didn't bother.
just email me if you have any questions on it: justin@justinjack.com
Re: xListView Class: open source need people to help perfect
Not bad.
Two things I noticed:
There's a scrollbar in the dropdownbox in the first column, which is not needed when there are only a few items.
When I add 10 more items to the LL the scrollbar is needed, ofcourse, but scrolling with the mouse-wheel doesn't work (the ListView is scrolled instead).
And when I click the checkboxes, sometimes the last cell I clicked into is highlighted, too.
Screenshot
Two things I noticed:
There's a scrollbar in the dropdownbox in the first column, which is not needed when there are only a few items.
When I add 10 more items to the LL the scrollbar is needed, ofcourse, but scrolling with the mouse-wheel doesn't work (the ListView is scrolled instead).
And when I click the checkboxes, sometimes the last cell I clicked into is highlighted, too.
Screenshot
-
- User
- Posts: 89
- Joined: Thu Feb 04, 2010 7:34 am
- Location: Decatur, TX
- Contact:
Re: xListView Class: open source need people to help perfect
Yup, I use it myself mostly for the functionality of the combobox and edit field to create invoice-like-forms. I needed a grid that you could type in and the cell would grow and wrap to fit the text in, I haven't actually used the checkbox for anything yet, I kind of fix bugs as they come up. That's the latest version i've been using. But ideally I'd like to be able to set a background image on it, kind of like a water-mark or logo, or just add more graphic functionality.
Yeah there's a bug with the combobox, I need to set the dropped width a little better or something.
Yeah there's a bug with the combobox, I need to set the dropped width a little better or something.
- Fangbeast
- PureBasic Protozoa
- Posts: 4789
- Joined: Fri Apr 25, 2003 3:08 pm
- Location: Not Sydney!!! (Bad water, no goats)
Re: xListView Class: open source need people to help perfect
JustinJack (and just because I am so supremely evil), INTEROCITER is spelt Interossiter:):)
That's it, I am falling on the floor howling.
I actually saw the black and white SciFi film 35 years ago when they first mentioned Interossiter and I loved it. Couldn't take it seriously (Should have seen the hairdos!!!!)
Back on topic: Nice looking control, could come in very useful.
That's it, I am falling on the floor howling.
I actually saw the black and white SciFi film 35 years ago when they first mentioned Interossiter and I loved it. Couldn't take it seriously (Should have seen the hairdos!!!!)
Back on topic: Nice looking control, could come in very useful.
Amateur Radio/VK3HAF, (D-STAR/DMR and more), Arduino, ESP32, Coding, Crochet