Valhalla Legends Forums Archive | Web Development | Windows TreeView / ListView in HTML+CSS?

GrokHas anyone seen HTML+CSS that can emulate the appearance of a Windows TreeView, and can point me to that example code (probably implemented as a SELECT element)?

I need the same thing for ListViews.

And NO, I don't want to script an actual TreeView and ListView object in IE, because that's my fallback position.  A design goal is to use standard XHTML/CSS2 where possible, and break compatibility only where no valid solution can be found.

Thanks, and before you ask, I haven't searched for a solution yet.  I'm hoping one of you already know where this can be found.  If you don't, I'll do the search ;)
February 06, 2004, 10:04 AM

Sorry I must say it, 1st item searching Google for TreeView Javascript.

The ListView I couldn't find quickly on Google, but I could probably write one for you....  I was once an avid Javascript programmer, but I haven't touched the stuff in about two years.  How closely do you want it to mimic Windows' ListView?
February 09, 2004, 08:57 PM
GrokAs I said I hadn't looked yet.   I was rather hoping to talk to someone with experience doing it first.  I'm perfectly capable of doing a search.

Now to the TreeView.  It doesn't have to be too close.  I've already figured out that putting a border around an UL and a white backcolor is a start, then setting list-images that vary by LI class can give me the icons in place of bullets.  I'll have to figure out how the event models can be used to mimick the clicks, right-clicks, and drag-and-drops though.  First two should be a breeze, not sure about drag and drop yet.

ListView might be a little harder but I can visualize a solution using javascript arrays and multiple keys for the columnheader choices.
February 09, 2004, 11:57 PM