Previous Next blank.gif Home Page

Class TableLite - Container for HTML tables.


SYNOPSIS

import HTMLgen
class TableLite(Container, Tbase)
  tuple attrs = ('align', 'border', 'frame ...
  string tagname = 'TABLE'

  # Methods inherited by TableLite from Tbase
  def __init__(self, arg=None, **kw)
  def __repr__(self)
  def end_tag(self)
  def start_tag(self)

  # Methods inherited by TableLite from Container
  def __add__(self, other)
  def append(self, *items)
  def copy(self)
  def empty(self)
  def last(self)
  def length(self)
  def prepend(self, *items)

DESCRIPTION

This is an implementation for Peter Gerhard who wanted a completely flexible Table class. Well, I also used it as an exercise in multiple inheritance. Gosh it's easy!

def __add__(self, other)

Support self + list

def __repr__(self)

default string for this markup

def append(self, *items)

Append one or more items to the end of the container.

def copy(self)

Return a full copy of the object.

def empty(self)

Empty the contents of the container.

def end_tag(self)

Return end tag for this tag type

def last(self)

Return the last item in the container.

def length(self)

Return the integer length of the container list.

def prepend(self, *items)

Prepend one or more items to the top of the container.

def start_tag(self)

Return start tag for this tag type including all attributes

Keywords Available

align
set to either left|right|center|justify|bleedleft|bleedright
border
outside frame width in pixels. set to 0 for no border
frame
set to void|above|below|hsides|lhs|rhs|vsides|box|border
cellpadding
integer spacing between cell content and cell border
cellspacing
integer spacing between cells (defines cell border thickness)
width
integer or percentage width of entire table. percentages are the fraction of the window while a literal integer forces a pixel width.

SEE ALSO

HTMLgen

Container

Tbase


Previous Next blank.gif Home Page
Buzz.gif

Copyright © Robin Friedrich
All Rights Reserved
Comments to author: friedric@phoenix.net
Generated: Mon Dec 2 1996