Flylib.com

Books Software

 
 
 

Main Header buttons


Main Header buttons

Now we'll add the row of buttons to the Main layout's Header. If you haven't already done so, download the buttons per the instructions in the Introduction. (If you prefer, you can create plain buttons using the Button Tool.)

The icon appears on the layout. Drag it onto the left side of the Header.

Repeat Step 1, inserting icon files in this order: Delete.tif, Sort.tif, List.tif, Tab.tif . Place each one to the right of the previous icon.

Select all five icons and choose Arrange > Align > Bottom Edges. Then use the arrow keys to vertically center the group within the Header.

Select only the Tab.tif icon (the one on the far right). Align its right edge with the right edge of the colored block below the Header by selecting both objects and choosing Arrange > Align > Right Edges.

Select all five icons again and choose Arrange > Distribute > Horizontally. Doing so distributes the blank space equally among the icons.

Select the New text block, and choose Edit > Duplicate. Drag the duplicate text onto the second button, and then change it to Delete . Use the arrow keys to nudge the Delete text into position. Check its distance from the top edge to ensure that it matches that of the original label (New).

Repeat this step to create the remaining labels: Sort, List, Tab .

Now we'll combine each label/button pair into a single grouped item. Select the New label and its button by -clicking or dragging a selection rectangle around the two items. Then choose Arrange > Group. Repeat this process for each additional label/button pair.

The New and Delete buttons both need only single-step scripts that we can specify in the Button Setup dialog box.

Select the New button, and choose Format > Button Setup. Select the New Record/Request step (from the Records section) and click OK. Repeat for the Delete button, but select the Delete Record/Request step.

Later in this chapter we'll create multi-step scripts and assign them to the Sort, List, and Tab buttons.



tab panel buttons

You'll use the Savings, Stocks, and CD tables to record account transactions, such as interest, dividends , and withdrawals. To simplify the creation of new transaction records, we'll place a button on each tab panel. We'll create the button scripts later in this chapter.

In Layout mode, switch to the Savings/Money Market tab.

Use the Button Tool to draw a new button under the Sav_Current Balance field. In the Button Setup dialog box, select Do Nothing as the temporary button action and then click OK.



Prev/ Next buttons

There are two more buttons to create. If you navigate among Main records by clicking the Book icon, you'll find that the incorrect tab is invariably displayed; that is, it doesn't match the selected investment type. We'll correct this by creating a pair of record navigation buttons. When clicked, the buttons will take you to the previous or next record in the current sort order and automatically display the correct tab panel.

Select one of the three tab panel buttons you just created, and choose Edit > Duplicate.

Edit the duplicate's label to read < Prev , set its size to 0.681" x 0.278" , and set its font color to dark blue.

Duplicate the < Prev button, and change the duplicate's label to Next > .

Drag the pair of labels into the right side of the Footer, aligning their tops with one another. Use the arrow keys to vertically center them within the Footer.

Note: The purpose of placing these buttons in the Footer is to make them always available, regardless of which tab panel is currently displayed. The command buttons were placed in the Header part for the same reason.