Adding buttons and notebooks to forms

Buttons and notebooks are design objects that can be added to forms. Buttons are objects that you can add to a form to carry out specified operations when clicked by a user. For example, if you would like to close a form, you can add a button to the form that will close the form when it is clicked by the user. After a button has been added to a form, you can customize its label and edit its methods and events.

A notebook is an object that you can use to help organize large or complex forms. For example, you can place the information from each table in the form's data model on a different notebook page, rather than on multiple form pages. This makes viewing and editing data much more efficient, because you can click a tab to display the page, rather than navigating multiple pages of the form. You can fully customize a notebook, its tabs, and its pages.

In this section, you'll learn about

  creating buttons
  
  working with button labels
  
  editing a button's methods and events
  
  working with notebook objects
  
  working with notebook tabs
  
  working with notebook pages
  
  changing notebook properties
  
  navigating notebook pages
  
  placing objects on notebook pages
  
Creating buttons

You can add a button to a form. After the button is added, you can change the shape of the button. There are three button types to choose from. A button's type controls its functionality. By default, a button is a standard push button at first. You can also create a radio button or check box. You can customize the style of radio buttons or check box buttons. A button's style controls its visual display.

To place a button on a form

1	Click the Button tool.

2	Drag the button pointer into the form design window, and click the form to place the button.

Notes

  For information about resizing a button, see "To resize a button."
  
  Buttons are available only in forms, not in reports.
  
Tip

  You can also insert a button by clicking Insert  Button. This places a button of default size at a predefined position on the form. You can move and resize the button as you want.
  
To resize a button

1	Select a button.

2	Drag any of the sizing handles to change the size of the button you are resizing.

To choose a button type

1	Right-click a button, and click Properties.

2	Click the General tab.

3	In the Type area, enable one of the following options:

  Push button-creates a labeled rectangular button that carries out an action described by an ObjectPAL method. When the button is pressed, its value is "True." When the button is not pressed, its value is "False." Push is the default button type.
  
  Radio button-creates a labeled round or diamond-shaped button that provides an option. Each time a user clicks the button, it toggles between being empty and being darkened. Each click also toggles its value between "False" and "True."
  
  Check box-creates a labeled square button that indicates a yes/no state. Each time a user clicks the button, it toggles between being enabled and disabled. Each click also toggles its value between "False" and "True."
  
Note

  For more information about button types, see "Button type properties."
  
To choose the style of a radio button or check box

1	Right-click a radio button or check box, and click Properties.

2	Click the General tab.

3	Disable the Use flat look check box.

4	In the Style area, enable one of the following options:

  Borland-creates radio buttons and check boxes that have a three-dimensional, raised look. Radio buttons are raised gray diamonds; check boxes are raised gray squares.
  
  Windows 3D-creates radio buttons and check boxes that look like the ones you see in many Windows products. Radio buttons are gray three dimensional circles; check boxes are squares.
  
Note

  For more information about button styles, see "Style property."
  
Working with button labels

When you add a button to a form, a text object displays with the button to allow you to add a label. This label can be edited. On a push button, the label is automatically centered; however, if you move the label, the label is no longer centered. You can re-center the label. If you choose to have no label on the button, you can also delete the label.

To edit a button's label

1	Click a button's text object three times.

On the third click, a cursor displays in the text object.

2	Type the new label.

To center a push button's label

1	Right-click a push button, and click Properties.

2	Click the General tab.

3	In the Style area, enable the Center label check box.

To delete a button's label

1	Double-click a button's label.

2	Click Edit  Delete.

Tip

  You can also delete a button's label by pressing DELETE after the label is selected.
  
Editing a button's methods and events

You use ObjectPAL to associate a method or event with a button. The user clicks the button to initiate the operation you defined in the ObjectPAL method or event. You can use ObjectPAL to edit existing events and methods. This is how you assign functionality to the button. For example, you can add a method to a button that makes Paradox to print a specific report, move to a specific record, or find a certain value when you push the button.

To edit a button's events

1	Right-click a button, and click Object explorer.

2	Click the Event tab.

3	Double-click an event in the list.

4	Edit the ObjectPAL event for the button.

Note

  For more information about ObjectPAL events, see "The ObjectPAL online Help file."
  
To edit button's methods

1	Right-click a button, and click Object explorer.

2	Click on the Method tab.

3	Double-click a method in the list.

3	Edit the ObjectPAL method for the button.

Note

  For more information about ObjectPAL methods, see "The ObjectPAL online Help file."
  
Working with notebook objects

A notebook is an object that you can use to help organize large or complex forms. You can place a notebook on a form. Notebooks are available only in forms, not in reports. You can select an entire notebook to make changes to its properties, such as its location or size. When a notebook's tabs do not fit in the available space, you can add a scroll bar so that the tabs can be displayed in one scrolling row; or, you can use multiple rows, which controls the number of tabs displayed and the number of rows that display them.

To place a notebook on a form

1	Click the Notebook tool.

2	Drag the notebook pointer into the form design window, and click the form to place the notebook at its default size.

Tip

  You can also insert a notebook by clicking Insert  NoteBook. This places a notebook of default size at a predefined position on the form or report. You can move and resize the notebook as you want.
  
To select a notebook

  Click a notebook.
  
A double-dotted line with sizing handles frames the notebook object.

Note

  If you have already clicked once or twice on a notebook, clear the selection by clicking on the form page outside the notebook object.
  
To move a notebook

1	Select a notebook.

2	Drag the notebook to its new location.

Note

  For more information about selecting a notebook, see "To select a notebook."
  
To resize a notebook

1	Select a notebook.

2	Drag one of the sizing handles to change the size of the notebook.

Note

  For more information about selecting a notebook, see "To select a notebook."
  
To add a scrollbar to a notebook

1	Select a notebook.

2	Right-click the notebook, and click Properties.

3	Click the General tab.

4	In the Options area, enable the Scrolling tabs check box.

Notes

  You cannot have multiple rows in a notebook if the Scrolling tabs check box is enabled. For more information about adding multiple rows to a notebook, see "To add multiple rows to a notebook."
  
  Scrolling does not change which page is active. When you scroll to the tab you want, you must click the tab to make its page active.
  
To add multiple rows to a notebook

1	Select the notebook.

2	Right click the notebook, and click Properties.

3	Click the General tab.

4	In the Options area, disable the Scrolling tabs check box.

5	In the Number of pages box, type the number of pages you want the notebook to have.

6	In the Tabs across box, type the number of tabs that you want displayed across each row of the notebook.

For example, if you specify eight pages with four tabs across, the notebook will have two rows with four tabs on each row.

Notes

  When you add rows, the tabs on any given row continue to remain on a common row. If you select a tab from the back row, the entire back row of tabs moves to the front row with the selected page.
  
  For more information about displaying the tabs in one scrolling row, see "To add a scrollbar to a notebook."
  
Working with notebook tabs

Notebook pages cannot be moved or resized separately from the notebook, but you can change the height of the tabs on the top or bottom of the notebook. After the tab heights have been changed, you can change the tab label font sizes so that the labels fit properly in the tab. You can also edit a tab's label.

To change the tab height on a notebook

1	Select the notebook.

2	Drag one or more of the following:

  The top center handle to resize the tabs on the top.
  
  The bottom center handle to resize the tabs on the bottom.
  
Notes

  For more information about selecting a notebook, see "To select a notebook."
  
  If you reduce the height of the tabs, you may want to choose a smaller font size for the labels. For more information about changing tab font size, see "To change a tab's font size."
  
To change a tab's font size

1	Click the tab label three times.

2	Right-click the tab, and click Properties.

3	Click the Font tab.

4	Choose a font size from the Size list.

To edit a tab's label

1	Click the tab label three times.

2	Press F2, and edit the label.

Note

  As you enter text, the label grows to fit the text.
  
Tip

  You can also edit a tab's label by clicking the label four times. On the fourth click, the cursor is placed inside the label.
  
Working with notebook pages

You can select a notebook page and make changes to the page. The default number of pages for a notebook is two. Although the default number of pages for a notebook is two, you can have any number of pages. You can also choose to delete a notebook page. You can rotate a notebook page, moving it to the last page's position, and you can cut a notebook page and paste it in any other location.

To select a notebook page

1	Select the notebook.

2	Click the page's tab.

Note

  For more information about selecting a notebook, see "To select a notebook."
  
To add a notebook page

1	Select the notebook.

2	Right-click the notebook, and click Page  Add page.

Paradox adds one page to the notebook at the end of the existing pages.

Note

  By default, a notebook has two pages. A notebook must have at least one page.
  
To add multiple notebook pages

1	Select the notebook.

2	Right-click the notebook, and click Properties.

3	Click the General tab.

4	In the Number of pages box, type the number of pages you want.

Notes

  The Tabs across property specifies how many tabs to display in each row of the notebook. By default, the Tabs across property is set to three. If you have more than three pages in a notebook, and you want the notebook to have only one row, you must match the number in the Tabs across box to the number in the Number of pages box. If you would like to have multiple rows in your notebook, see "To add multiple rows to a notebook."
  
  For more information about selecting a notebook, see "To select a notebook."
  
To delete a notebook page

1	Select a notebook page.

2	Click Edit  Delete.

Notes

  By default, a notebook has two pages. A notebook must have at least one page.
  
  For more information about selecting a notebook page, see "To select a notebook page."
  
Tip

  You can also delete a page by selecting the page and pressing DELETE.
  
To rotate a notebook page

  Right-click the notebook, and click Rotate pages.
  
The first page in the notebook is sent to the end of the existing pages.

To copy a notebook page

1	Select a notebook page.

2	Right-click the page, and click one of the following:

  Copy-copies the information to the clipboard
  
  Cut-cuts the information out of the document and places it on the Clipboard
  
3	Select another notebook page.

4	Right-click that page, and click Paste.

Paradox inserts the Clipboard's notebook page after the active notebook page.

Note

  For more information about selecting a notebook page, see "To select a notebook page."
  
Tip

  You can also copy and paste a notebook page using the Copy, and Paste commands from the Edit menu.
  
Changing notebook properties

You can change the properties for a notebook as a whole, or the properties of individual pages. Individual pages can be colored, and each page can have a different color when it is active than when it is inactive. You can make the entire notebook, or individual pages, invisible at runtime.

To change notebook properties

1	Select the notebook.

2	Right-click the notebook, and click Properties.

3	Edit the notebook properties.

Note

  For more information about selecting a notebook, see "To select a notebook."
  
To change properties for an individual page

1	Select the notebook page.

2	Right-click the page, and click Properties.

3	Edit the notebook properties.

Note

  For more information about selecting a notebook page, see "To select a notebook page."
  
To designate a color for a page when it is active

1	Select the notebook page.

2	Right-click the page, and click Properties.

3	Click the General tab.

4	Click a color on the Inactive color palette.

Note

  For more information about selecting a notebook page, see "To select a notebook page."
  
To designate a color for a page when it is inactive

1	Select the notebook page.

2	Right-click the page, and click Properties.

3	Click the Inactive color tab.

4	Click a color on the Inactive color palette.

Note

  For more information about selecting a notebook page, see "To select a notebook page."
  
To make a notebook invisible at run-time

1	Select the notebook.

2	Right-click the notebook, and click Properties.

3	Click the Run time tab.

4	Disable the Visible check box.

Note

  For more information about selecting a notebook, see "To select a notebook."
  
Tip

  For more information on making individual notebook pages invisible at runtime, see "To make individual notebook pages invisible at run-time."
  
To make individual notebook pages invisible at run-time

1	Select the notebook page.

2	Right-click the page, and click Properties.

3	Click the Run time tab.

4	Disable the Visible check box.

Note

  For more information about selecting a notebook page, see "To select a notebook page."
  
Tip

  For more information on making a notebook invisible at runtime, see "To make a notebook invisible at run-time."
  
Navigating notebook pages

You can move through a notebook using the mouse and keyboard, or by using the notebook's right-click menu.

To navigate notebook pages by using the mouse and keyboard

To	Do the following

Display a notebook page	Click its tab.

Cycle forward through the objects	Press TAB. Use this technique to move to any notebook page, or to any object on any notebook page.

Cycle forward through the objects	Press SHIFT + TAB.

To navigate notebook pages by using the right-click menu

1	Select the notebook.

2	Right-click the notebook, click Page, and click one of the following:

  Next-moves to the page to the right of the current page. If the current page is on the right edge of the notebook, Paradox chooses the left-most page on the row above the current page.
  
  Previous-moves to the page to the left of the current page. If the current page is on the left edge of the notebook, Paradox chooses the right-most page on the row above the current page.
  
  First-makes the first page (the one created first) current. In notebooks with multiple rows that have been shifted around, this indicates which page is first.
  
  Last-makes the last page you created current.
  
Note

  For more information about selecting a notebook, see "To select a notebook."
  
Placing objects on notebook pages

You can place any design object on a notebook page.

To place a design object on a notebook page

1	Select the notebook page.

2	Click the object's tool on the Form design toolbar.

3	Drag the object's pointer to the notebook page.

Note

  For more information about selecting a notebook page, see "To select a notebook page."
  
Tip

  You can also insert an object on a notebook page by clicking Insert and then choosing the object from the list. This will place an object of default size at a predefined position on your notebook page. You can then move the object on the notebook page and resize the object you want.
  



