On Wed, 2004-01-07 at 10:28, Goldthwaite, Joe wrote:
Dylan Reinhardt wrote:
You could hack this together using DHTML/JavaScript with frames.
Use JavaScript to measure the columns as rendered and squeeze a matching header into a frame just above the table. Won't be trivial, but it should definitely be possible.
This is probably the best suggestion but it's beyond my current abilities. I didn't know that JavaScript could read the column headings. Does Jython allow you to do this kind of scripting using Python instead of Java? I'd rather not go back to a second language.
JavaScript is a client-side browser scripting language that is not related to Java. Programming in JavaScript is a bit like jogging in deep snow -- you can usually get where you're going, but it sucks. Unfortunately, there aren't any good alternatives when it comes to client-side scripting. And this will need to be client-side if you're going to account for client-side settings such as screen size. JavaScript can dynamically obtain (and change) the sizes, position, and other properties of just about any element that supports an id attribute. Measuring, sizing and drawing elements generally works well, but is inevitably a bigger hassle than it seems like it should be.
I'll explore Dylan's suggestion but the complexity means I'll have to save it for later. It feels like I'm reinventing the wheel here. This seems like it should be a common problem that something in HTML should be able to deal with automatically.
It's solved in CSS, IIRC... but until CSS is fully implemented by major browsers, you're stuck re-inventing this particular wheel.
Oh well. I guess you need to deal with what is not what should be.
An excellent motto for a web-app programmer. :-) Dylan