
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@995 8e941d3f-bd1b-0410-a28a-d453659cc2b4
409 lines
9.4 KiB
HTML
409 lines
9.4 KiB
HTML
<HTML>
|
|
|
|
<HEAD>
|
|
<TITLE></TITLE>
|
|
<link rel="stylesheet" type="text/css" href="demo.css">
|
|
|
|
</HEAD>
|
|
|
|
<BODY class="indent">
|
|
<H4 CLASS="heading"><A NAME="Simple2x2">Simple 2 x 2 table</A></H4>
|
|
<TABLE border="1">
|
|
<TR>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>3</TD>
|
|
<TD>4</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<PRE><CODE>
|
|
<table border>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>2</td>
|
|
<tr>
|
|
<td>3</td>
|
|
<td>4</td>
|
|
</table></CODE></PRE>
|
|
|
|
<H4 CLASS="heading"><A NAME="Another2x2">Another 2 x 2 table</A></H4>
|
|
<TABLE border="1">
|
|
<TR>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>3</TD>
|
|
<TD>Cells expand<BR>
|
|
to fit</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<PRE><CODE>
|
|
<table border>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>2</td>
|
|
<tr>
|
|
<td>3</td>
|
|
<td>Cells expand<br>
|
|
to fit</td>
|
|
</table></CODE></PRE>
|
|
|
|
<H4 CLASS="heading"><A NAME="RowColSpan">Rowspan and Colspan attributes</A></H4>
|
|
<TABLE border="1">
|
|
<TR>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
<TD>3</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>4</TD>
|
|
<TD ROWSPAN="2" COLSPAN="2"> Rowspan and Colspan attributes allow cells to occupy more than one row or column
|
|
</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>5</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<PRE><CODE>
|
|
<table border>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>2</td>
|
|
<td>3</td>
|
|
<tr>
|
|
<td>4</td>
|
|
<td rowspan=2 colspan=2>
|
|
Rowspan and Colspan attributes allow cells to
|
|
occupy more than one row or column
|
|
</td>
|
|
<tr>
|
|
<td>5</td>
|
|
</table></CODE></PRE>
|
|
|
|
<H4 CLASS="heading"><A NAME="Headings">Rows and/or Columns may have headings</A></H4>
|
|
<TABLE border="1">
|
|
<TR>
|
|
<TD></TD>
|
|
<TH COLSPAN="3">Days of Week</TH>
|
|
</TR>
|
|
<TR>
|
|
<TD></TD>
|
|
<TH>Monday</TH>
|
|
<TH>Tuesday</TH>
|
|
<TH>Wednesday</TH>
|
|
</TR>
|
|
<TR>
|
|
<TH>Week 1</TH>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
<TD>3</TD>
|
|
</TR>
|
|
<TR>
|
|
<TH>Week 2</TH>
|
|
<TD>4</TD>
|
|
<TD>5</TD>
|
|
<TD>6</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<PRE><CODE>
|
|
<table border>
|
|
<tr>
|
|
<td></td>
|
|
<th colspan=3>Days of Week</th>
|
|
<tr>
|
|
<td></td>
|
|
<th>Monday</th>
|
|
<th>Tuesday</th>
|
|
<th>Wednesday</th>
|
|
<tr>
|
|
<th>Week 1</th>
|
|
<td>1</td>
|
|
<td>2</td>
|
|
<td>3</td>
|
|
<tr>
|
|
<th>Week 2</th>
|
|
<td>4</td>
|
|
<td>5</td>
|
|
<td>6</td>
|
|
</table> </CODE></PRE>
|
|
|
|
<H4 CLASS="heading"><A NAME="CellAlign">Alignment in cells can be controlled</A></H4>
|
|
<TABLE border="1">
|
|
<TR>
|
|
<TD></TD>
|
|
<TH COLSPAN="3">Alignment Attributes, Align and VAlign</TH>
|
|
</TR>
|
|
<TR>
|
|
<TH>Vertical<BR>
|
|
Alignment</TH>
|
|
<TD VALIGN="top">Top</TD>
|
|
<TD VALIGN="middle">Middle</TD>
|
|
<TD VALIGN="bottom">Bottom</TD>
|
|
</TR>
|
|
<TR>
|
|
<TH>Horizontal<BR>
|
|
Alignment</TH>
|
|
<TD ALIGN="left">Left</TD>
|
|
<TD ALIGN="center">Center</TD>
|
|
<TD ALIGN="right">Right</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<PRE><CODE>
|
|
<table border>
|
|
<tr>
|
|
<td></td>
|
|
<th colspan=3>Alignment Attributes, Align and VAlign</th>
|
|
<tr>
|
|
<th>Vertical<br>Alignment</th>
|
|
<td valign=top>Top</td>
|
|
<td valign=middle>Middle</td>
|
|
<td valign=bottom>Bottom</td>
|
|
<tr>
|
|
<th>Horizontal<br>Alignment</th>
|
|
<td align=left>Left</td>
|
|
<td align=center>Center</td>
|
|
<td align=right>Right</td>
|
|
</table> </CODE></PRE>
|
|
|
|
<H4 CLASS="heading"><A NAME="Background">Table cells can contain just about anything<BR>
|
|
Background colors can be added</A></H4>
|
|
<TABLE border="1">
|
|
<TR ALIGN="center">
|
|
<TD><IMG SRC="glass.bmp" WIDTH="48" HEIGHT="54"><BR>
|
|
Images</TD>
|
|
<TD BGCOLOR="#ffcdcd"><A HREF="#Simple2x2">2 x 2 Table</A><BR>
|
|
Hotspots</TD>
|
|
</TR>
|
|
<TR ALIGN="center">
|
|
<TD>Some<BR>
|
|
Text</TD>
|
|
<TD><TABLE border="1" BORDERCOLOR="#37ffcd">
|
|
<CAPTION>Another table
|
|
</CAPTION> <TR>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
<TD BGCOLOR="#D9D9F3">3</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>4</TD>
|
|
<TD>5</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<PRE><CODE>
|
|
<table border>
|
|
<tr align=center>
|
|
<td><img src="glass.bmp"><br>
|
|
Images</td>
|
|
<td bgcolor="#ffcdcd">
|
|
<a href="#TableContents">Table Contents</a><br>
|
|
Hotspots</td>
|
|
<tr align=center>
|
|
<td>Some<br>Text</td>
|
|
<td><table border bordercolor="#37ffcd">
|
|
<caption>Another table</caption>
|
|
<tr>
|
|
<td>1</td>
|
|
<td>2</td>
|
|
<td bgcolor="#D9D9F3">3</td>
|
|
<tr>
|
|
<td>4</td>
|
|
<td>5</td>
|
|
</table></td>
|
|
</table></CODE></PRE>
|
|
|
|
<H4 CLASS="heading"><A NAME="CellWidth">Cell widths can be specified as a percentage of
|
|
table width and table width as a percentage of window width</A></H4>
|
|
<TABLE border="1" WIDTH="75%">
|
|
<TR>
|
|
<TD WIDTH="20%">20%</TD>
|
|
<TD WIDTH="50%">50%</TD>
|
|
<TD WIDTH="15%">15%</TD>
|
|
<TD WIDTH="15%">15%</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<PRE><CODE>
|
|
<table border width=75%>
|
|
<tr>
|
|
<td width=20%>20%</td>
|
|
<td width=50%>50%</td>
|
|
<td width=15%>15%</td>
|
|
<td width=15%>15%</td>
|
|
</table> </CODE></PRE>
|
|
|
|
<H4 CLASS="heading"><A NAME="Centering">Tables may be centered and have a caption either on
|
|
the top or on the bottom.</A></H4>
|
|
<TABLE border="1" WIDTH="75%" ALIGN="center">
|
|
<CAPTION ALIGN="bottom">
|
|
<INS><H3>Figure 1</H3>
|
|
Illustration of Centered Table with a Width of 75% </INS>
|
|
</CAPTION>
|
|
|
|
|
|
<TR>
|
|
<TD WIDTH="20%">20%</TD>
|
|
<TD WIDTH="50%">50%</TD>
|
|
<TD WIDTH="15%">15%</TD>
|
|
<TD WIDTH="15%">15%</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<PRE><CODE>
|
|
<table border width=75% align=center>
|
|
<caption align=bottom><h3>Figure 1</h3>
|
|
Illustration of Centered Table with a Width of 75%
|
|
</caption>
|
|
<tr>
|
|
<td width=20%>20%</td>
|
|
<td width=50%>50%</td>
|
|
<td width=15%>15%</td>
|
|
<td width=15%>15%</td>
|
|
</table></CODE></PRE>
|
|
|
|
<H4 CLASS="heading"><A NAME="CellSpacing">The CellSpacing attribute controls the spacing
|
|
between table cells.</A></H4>
|
|
<TABLE WIDTH="50%" ALIGN="center">
|
|
<TR VALIGN="top">
|
|
<TD align="center"> <TABLE border="1" CELLSPACING="0">
|
|
<CAPTION>CellSpacing of 0
|
|
</CAPTION> <TR>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>3</TD>
|
|
<TD>4</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD align="center"> <TABLE border="1" CELLSPACING="10">
|
|
<CAPTION>CellSpacing of 10
|
|
</CAPTION> <TR>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>3</TD>
|
|
<TD>4</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<TABLE ALIGN="center" width="50%">
|
|
<TR VALIGN="top">
|
|
<TD> <PRE><CODE> <table border
|
|
CellSpacing=0>
|
|
<Caption>
|
|
CellSpacing of 0
|
|
</caption>
|
|
<tr><td>1</td>
|
|
<td>2</td>
|
|
<tr><td>3</td>
|
|
<td>4</td>
|
|
</table></CODE></PRE>
|
|
|
|
</TD>
|
|
<TD> <PRE><CODE> <table border
|
|
CellSpacing=10>
|
|
<Caption>
|
|
CellSpacing of 10
|
|
</caption>
|
|
<tr><td>1</td>
|
|
<td>2</td>
|
|
<tr><td>3</td>
|
|
<td>4</td>
|
|
</table> </CODE></PRE>
|
|
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<H4 CLASS="heading"><A NAME="CellPadding">The CellPadding attribute controls the padding
|
|
around table cells.</A></H4>
|
|
<TABLE WIDTH="50%" ALIGN="center">
|
|
<TR VALIGN="top">
|
|
<TD align="center"> <TABLE border="1" CELLPADDING="0">
|
|
<CAPTION>CellPadding of 0
|
|
</CAPTION> <TR>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>3</TD>
|
|
<TD>4</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
<TD align="center"> <TABLE border="1" CELLPADDING="10">
|
|
<CAPTION>CellPadding of 10
|
|
</CAPTION> <TR>
|
|
<TD>1</TD>
|
|
<TD>2</TD>
|
|
</TR>
|
|
<TR>
|
|
<TD>3</TD>
|
|
<TD>4</TD>
|
|
</TR>
|
|
</TABLE>
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<TABLE ALIGN="center" width="50%">
|
|
<TR VALIGN="top">
|
|
<TD> <PRE><CODE> <table border
|
|
CellPadding=0>
|
|
<Caption>
|
|
CellPadding of 0
|
|
</caption>
|
|
<tr><td>1</td>
|
|
<td>2</td>
|
|
<tr><td>3</td>
|
|
<td>4</td>
|
|
</table></CODE></PRE>
|
|
|
|
</TD>
|
|
<TD> <PRE><CODE> <table border
|
|
CellPadding=10>
|
|
<Caption>
|
|
CellPadding of 10
|
|
</caption>
|
|
<tr><td>1</td>
|
|
<td>2</td>
|
|
<tr><td>3</td>
|
|
<td>4</td>
|
|
</table> </CODE></PRE>
|
|
|
|
</TD>
|
|
</TR>
|
|
</TABLE>
|
|
|
|
<p CLASS="heading"><A NAME="Borderless">Borderless tables</A></p>
|
|
<P>Borderless tables can be very useful for formatting documents. Tables are used in several places in this
|
|
document to place items side by side. For instance, the Contents window above is divided into four columns using a
|
|
Table. </P>
|
|
<P> </P>
|
|
<TABLE ALIGN="center">
|
|
<TR>
|
|
<TD><IMG SRC="wmelon.bmp" WIDTH="100" HEIGHT="80" ALT="wmelon.bmp" transp></TD>
|
|
<TD>Watermelon<BR>
|
|
with seeds</TD>
|
|
</TR>
|
|
</TABLE>
|
|
<CENTER>
|
|
<P>Text can be placed at the side of an image.</P>
|
|
</CENTER>
|
|
<PRE><CODE>
|
|
<table align=center>
|
|
<tr><td><img src="wmelon2.bmp"></td>
|
|
<td>Watermelon<br>with seeds</td>
|
|
</table>
|
|
</CODE></PRE>
|
|
</BODY>
|
|
</HTML>
|
|
|