The appearance of the tent cards you can use to allow customers to register for your draw is completely definable by you. I provide a sample card for the fictitious Presto Bistro restaurant in the You're a Winner! client program that you can use as a base template for your own definition.
The sample definition is set up to print on a card that measures 4"x6", so you will need a printer capable of printing on that size of paper. Most inkjet and photo printers are capable of doing so.
The image above is created by the form definition laid out in the table below.
I'll discuss the content of the table first and then outline the commands available second later on this page.
There are seven columns in the table. The first column is a sequence number which indicates the order in which commands are processed. The order in which commands are processed is important, as I'll show.
The second column is a brief description of the command itself. There are only four commands, as follows:
Three of the commands print something on the page, so I'll first discuss the coordinate system the form definition uses. I use a row/column coordinate system where each value is independent of a particular printer and each are set at 1/300th of an inch (or approximately 11.8 dots per millimeter). Rows are equivalent to the Y-axis and columns are equivalent to the X-axis, if you're more comfortable with those concepts. The row and column values appropriate to commands that print something are indicated in the third and fourth columns. Note that the behaviour of the positioning system is also dependent on the alignment and positioning selections indicated in columns five and six.
There are three types of alignment available for printable items. Left alignment starts printing the top left-most pixel of the item at the current row and column position (subject to the rules related to positioning, discussed next). Right alignment causes the item's top right-most pixel to appear at the current row/column position. Center alignment causes the system to display the middle-top-most pixel to appear at the current row/column position. The alignment rules are applied to an item after the positioning rules, discussed next.
There are two types of positioning available for printable items and the positioning type indicates whether the row and column co-ordinates in the form definition statement represent an absolute position on the page or a position relative to the current printing location.
Absolute positioning resets the current printing row and current printing column variables with the values that you specify, with one exception. If you specify absolute positioning and also specify a row value of zero, the system assumes that you want the item printed on the current row, not the first row of the page. This allows you to set up columns on the form.
Relative positioning simply adds the values that you specify to the existing values of the current printing row and current printing column variables - with one exception. If you specify relative positioning, and specify an increment to the row co-ordinate, the current printing column variable is reset to zero so the value that you specify for the column co-ordinate becomes the offset from the left margin.
As I said earlier, I recommend that you define the form so that your rows and columns always increase. In fact, if you're going to use relative positioning, it's essential.
After an item has been printed the current printing column variable will indicate the right-most position of the item just printed. The column increment (if any) is determined by the justification used for the item. is always incremented by the length of the item actually printed. Therefore, if you specify an increment of zero for both row and column counters and relative positioning, the item you want printed will be printed immediately to the right of whatever was printed before, with no space intervening.
Navigating the table is straightforward. You can move the highlight bar from command to command by using the up or down arrow keys and the PgUp and PgDn keys. You can select a command by either double clicking on the command or highlighting it and then clicking the button labeled Edit/View. For people who like working on the keyboard only, you can also select a command by highlighting it and then typing Alt-E to perform a virtual click of the Edit/View button. You may notice that all of the buttons along the bottom of the table have an underscored character. Holding down the Alt key and typing the underscored letter has the same effect as clicking the button with the mouse.
You can delete an existing command by highlighting it and clicking the Delete button.
You can add a new command at the position where the highlight bar is currently positioned by clicking the Add button. Commands are processed in the order they appear in the table, so it's important to place commands in the correct sequence. When you add a new command at the highlight location (wherever that is) the program creates a new slot in the definition, numbers that with what was the number of the originally highlighted item and renumbers the original item and all subsequent items by adding one to their values. I'll discuss why the correct sequence of commands is important further in the document in the details of some of the commands.
You can print the contents of the table by clicking the Print Definition button. If you create a form definition much longer than the one I've provided here, this might be helpful when proof-reading or debugging.
I'll skip the first two commands for now and look at the commands starting at item 3. Accordingly, the first command I'll discuss is the Select Font command. When you click on the Select Font command line, you'll see...
The Select Font command is a two-step process. It's a little redundant and I apologize for that but it's because I'm maintaining compatibility with a much larger program that I also developed. When you click the Select Font command line you will be presented with a new dialog box in which you have to click another Select Font button to actually be able to select the font. When you do, you'll see...
...another dialog box that actually itemizes the font names, sizes, styles, effects and colors that you might want to use. Any font that's installed on your computer and that your printer can render can be used in this definition. Font commands are "sticky". By that, I mean that once you've selected a particular font, that font stays selected through all the subsequent commands until the program encounters another Select Font command. This is the first of the reasons why the order of commands is important.
The next command I'll discuss is the Text command.
The first item to be selected when you create (or edit) a Text command is whether you want absolute or relative positioning, and that requires some explanation.
The next commands I want to discuss are the two commands at the top of the form definition, the Image File command and the QR Code command. I'll discuss the Image File command first.