![]() |
|
|
|
Alventis Memos support complex nested tables. We will only be talking about Memo Tables in this chapter. Tables should be familiar to you from the most common word processors. Little, if anything, is different in our Memos. Nonetheless, let's start by pointing out some table features you may find interesting.
Tables are nested or hierarchical. This means that you can have a table "sitting" in a cell of another table. Generally speaking, each cell of each table can contain whatever any Memo can contain: text, pictures, more tables, and so on. There is no pre-set limit on the nesting level, i.e., you can have a table in a cell of a table, which is in a cell of a table, which is... you get the idea.
Technically-speaking, tables resemble HTML-style tables more than, e.g., ones found in Microsoft Word 97. That is, each cell has 4 border edges + the table itself has same. This contrasts with older-style tables that were comprised of lines between cells, and where cells did not have a concept of borders "belonging" to them.
Tables can have either a fixed width set by dragging the right edge of the table with the mouse – or a width that is set as a percentage of the width of the Memo.
A table is considered selected under the following circumstances: it is really selected by clicking with the mouse in the margin just to the left of the table; the cursor is in a cell of this table; and finally, one or more cells of this table are selected.
Cells are selected by dragging the mouse from one cell to another. You can also select cells using the Select Rows
As with many word processors, you navigate between cells by hitting the Tab key (or Shift-Tab to go in the opposite direction), you can insert Tab characters in a cell by hitting Ctrl-Tab, and you can extend the table one row at a time by hitting Tab in the last cell. You can resize columns and rows by dragging their edges.
But enough about what we can do, let's do something. Let's start by learning to create tables.
Insert Table dropdown is the smallest dialog in Alventis. You specify the dimensions of the table you want to create (how many Rows by how many Columns). You also specify whether you want a Fixed-width table (check the checkbox) or one whose width is proportional to the width of the Memo. We'll talk about this in more detail in a bit, when we get to the Table Format dialog. Once satisfied with the initial settings for the table, you can hit the Insert button to insert the table at the current cursor position in the Memo. From now on, this InstaButton remembers what kind of table it is set-up to create, so you can create more tables by simply clicking on the button. Now that we have our table, it's time to improve its appearance.
The dialog is divided in two areas. On the left, you find settings that apply to the entire table as a whole. On the right are settings applicable to cells. These are merely default settings for cells: each cell may override some of them on an individual, per-cell basis. We'll get to this subject later, when we talk about the Cell Format InstaButton, but keep in mind that there's more to cell format than meets the eye in this dialog.
Back in the Table Format (left-side) area of the dialog we find a group of controls responsible for the appearance of table borders and background. Once again, table borders are just the 4 edges of the big "box" that has cells in it – and not all lines that comprise the table. This "box" can have no border at all (None), a Flat border drawn with a single Border Color, or a 3D border drawn with two colors: Border Color and Border Shadow color (no, it's not a real shadow, just the color of the right and bottom edges of the table). A table can have a Background color. Set it to "None" to make the table transparent, i.e., let the background color of its paragraph, if any, show through. You can make each edge of the table drawn or not drawn by toggling the corresponding edge of the rectangle that surrounds the above-mentioned buttons.
Finally, you can change the thickness of the border using the SpinEdit box named accordingly.
The next group of controls has to do with gaps between cells. Cell-to-Cell Gaps are distances (in pixels) between adjacent cells. The "H" gap applies to left-right neighbors and the "V" gap – ones that are adjacent vertically. Cell-to-Border Gaps are similar, but apply to distances between cells and borders of the table itself.
The Single-Line Values buttons performs a simple trick which exists for your convenience. What it does is set things up in such a way that tables start to look like those from the Word 97 era: single lines everywhere. Specifically, it sets Border Thickness (of both the table and the cells) to 1, and all Gaps to -1, which makes borders of adjacent cells overlap, which makes it look like there's only a single line between the cells.
Table Width Mode is the next and very important radio group. It pretty much spells out what it does, but let's go over this in a bit more detail.
Fixed-width tables maintain a certain width that initially (when the table is first created) equals that of the Memo, and can be set at any time by dragging the right edge of the table left or right with the mouse. Note that there is no way to set it numerically. When you resize the Memo, the table "stays put" and maintains its fixed width.
Proportional tables always maintain their width relative to the width of the Memo. A Proportional table with a 100% width (set in the corresponding SpinEdit box) will resize itself to always occupy the entire width of the Memo. You can't resize such a table with the mouse. An attempt to drag its right edge will affect the widths of its columns though, so don't try it unless you want the columns to get resized inversely-proportionally to your table-resizing attempt. If this is not clear, try it an see for yourself.
At the very bottom of this section of the dialog we find the Repeating Table Header Rows SpinEdit box. This attribute is only applicable to printing, so don't expect to see any immediate effect. What it specifies is how many rows of the table are to be considered Header Rows and should therefore be printed repeatedly at the top of every page that ends up with a portion of this table.
The Default Cell Format section on the right-hand side specifies some default formatting attributes applicable to cells. The first group of controls does exactly the same thing their counterparts on the left do to the table: None/Flat/3D specify overall border style, Border Color/Shadow specify one or two colors of the border, and Border Thickness specifies just that.
Cell Padding is something new though. This specifies (in pixels) an additional amount of space you would like to leave between the cell's edges and its contents.
The Vertical Alignment radio group sets the default alignment for cell contents: Top, Middle, or Bottom. This will only come into play if you end up with a cell that is taller than its contents.
The Cell Format InstaButton
At the top we yet again find the now familiar Border/Background control group. It has been described in detail at the beginning of the Table Format topic, so we won't repeat its rather obvious workings here.
The Vertical Alignment radio group has also been dealt with earlier. This group is very similar with one notable addition: the Table's Default option. This setting tells the cell to simply use the default Alignment specified for the entire table in the Table Format dialog. The other 3 options tell the cell to override the table's default and use the one you select here.
The Cell Height Mode group controls the height of the cell. Automatic mode is the default and means the cell has a minimum height of a single line of text and grows as necessary to accommodate its contents. Alternatively, you can specify a minimum height of a cell in pixels. It will not shrink smaller than that, but will still grow if necessary.
While we're on the subject of printing, it's only fitting (pun intended) to mention a limitation you should be aware of. If you create a cell so tall that it doesn't fit on a single page, its bottom will not get printed. It will simply get chopped-off when it reaches the end of the page. So don't create huge cells if you intend to print the Memo that contains them.
Memo tables support Cell Merging and Splitting.
Finally, there also exist a bunch of buttons so simple they barely merit mention:
|