Matthieu,

Sounds like a starting point. The columns don't have to be equal in depth but will 
have a defined height. I was afraid it was going to be about word/char counting. Time 
for some major sting manipulation. :) 

BTW, yes, it is one var sting. 
Thanks for the time and Brain Cycles!

Justin

-----Original Message-----
From: Cornillon, Matthieu [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 2:35 PM
To: CF-Talk
Subject: RE: 3 column output


Justin,

I did something _sort of like_ this.  I have a page that asks users to check
from a list of items.  The number of items varies based on a value selected
on a previous page.  I do a query for the items.  I count the number, divide
by three, and then have start and stop values for the first, second, and
third third of the list.  Then I create a single-row, three-column table,
inside each cell of which appears a table with a CFQUERY-wrapped table row.
Because I did the math in advance, it all works out.

Your question adds a wrinkle to the problem: how do you deal with the issue
of wrapping?  Hmmm.  I'll be honest that it's a tough one.  I can think of
really nasty ways to loop through the text you have, breaking it into lines
as you go based on number of spaces, counting those lines, etc., but that's
going to be rotten even if it works at all.  Hmmm.  Hmmm.  Hmmmmmm.

Yeah.  It's awfully ugly.  But here goes:  You pull the whole long text into
one variable (I don't even know if there is a variable in which such long
text will fit.  You do an outer loop that goes from character 1 to character
n (the last character in the string), stepping by the length of characters
you want to allow in a line of text within a column.  You probably will have
to use a fixed-width font, or make the length of chars for a row small
enough to handle the widest chars.  An inner loop then goes backward from
that point until it finds a space character, and replaces the character with
some list separator.  Let's say | for now.  Then you have a delimited list
of lines.  You count the number of list items, divide by three, use the
above-described table structure, and loop through the list for output.

Like I said, ugly.  But maybe it will give you an idea for a better
solution?  I hope so.

Matthieu

-----Original Message-----
From: Justin Hansen [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 25, 2002 3:21 PM
To: CF-Talk
Subject: 3 column output


Ok, here is a good one for ya. I have a database of stories and they want to
display it in the browser as a 3 column, "newspaper style" display. How does
the all mighty group think this could be accomplished. How could one get a
story to wrap from Column 1 to 2 and 3 with HTML Tables? Is this type of
linked tables available in Flash MX? 

Anyone... Anyone....

Justin Hansen
--------------------------
Uhlig Communications
Systems Engineer
--------------------------
[EMAIL PROTECTED]
913-754-4273
--------------------------


______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to