g r i m m w e r k s <[EMAIL PROTECTED]> wrote:

> Ok so I'm trying to use a simple html table for text member layout, and all
> in all it's fine, but it seems to make the cell too high -- almost like
> adding a line under it.
> 
> Any pointers?

Hi grimmwerks,

If you create a table and look at the resulting html, you'll see that
Director adds unwanted <br> tags at the beginning and end.  (It also
arbitrarily sets the bgcolor to "#CCCCCC").

Watch out for line breaks:

  member("Text").html = "<html><body><table><tr><td>
  Single   cell</td></tr></table></body></html>"

  put member("Text").html
  -- "<html>
  <head>
  <title>Untitled</title>
  </head>
  <body bgcolor="#CCCCCC">
  <br>
  <table border=0>
  <tr><td>Single cell</td></tr>
  </table>
  <br>
  </body>
  </html>
  "

You cannot remove these <br> tags through treating the html directly, but
you can delete the extra lines by using standard Lingo manipulation of the
text member:

  delete member("Text").line[1]
  delete member("Text").line[ member("Text").line.count]

  put member("Text").html
  -- "<html>
  <head>
  <title>Untitled</title>
  </head>
  <body bgcolor="#CCCCCC">
  <table border=1>
  <tr><td>Single cell</td></tr>
  </body>
  </html>
  "

You can override the bgcolor by setting it yourself, but you cannot trust
the html to correspond to your input.  Try the following and watch what
happens to the border size and the text color when you execute the second
line:

  member("Text").html = "<html><body bgcolor=#FFFFCC>
  <font color=#FFCC00><table border=3><tr><td><font color=#FFCC00>
  <b>Single cell<b></font></td></tr></font></table></body></html>"

  member("Text").html = member("Text").html -- color and border change


Because of these quirks, setting up a table the way you want it can be
tricky.  I suggest you create the shape of the table in html, then use
standard Lingo manipulation of the properties of the text member to deal
with any formatting.

Cheers,

James

[To remove yourself from this list, or to change to digest mode, go to 
http://www.penworks.com/lingo-l.cgi  To post messages to the list, email 
[EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED]). Lingo-L is for 
learning and helping with programming Lingo.  Thanks!]

Reply via email to