1 / 19

Chapter 6 Lesson C

Chapter 6 Lesson C. Creating Custom Forms. Lesson C Objectives. Convert data blocks to control blocks Link data blocks to control blocks Create a form that has multiple canvases Create tab canvases Create stacked canvases. Converting a Data Block to a Control Block.

manon
Download Presentation

Chapter 6 Lesson C

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 6Lesson C Creating Custom Forms

  2. Lesson C Objectives • Convert data blocks to control blocks • Link data blocks to control blocks • Create a form that has multiple canvases • Create tab canvases • Create stacked canvases

  3. Converting a Data Block to a Control Block

  4. Converting a Data Block to a Control Block • We can create a control block: • Manually and drawing the layout by hand • Create a data block using the Data Block Wizard and Layout Wizard, then convert it to a control block.

  5. Converting a Data Block to a Control Block • There are two steps required to convert a data block to a control block: • Change the data block’s Database Data Block property value to No • Change the Required property value of the text item that represents the data block table’s primary key to No

  6. Linking a Data Block to a Control Block • It is often advantageous to create a form that contains a mix of data blocks and control blocks • Often the blocks are linked with a master-detail relationship

  7. Creating the Data Block • When linking a data block to a control block, the Data Block Wizard cannot be used to create the master-detail relationship • Instead, the data block should be created without any relationship

  8. Linking the Control Block and the Data Block • In order to establish the link between the data and control blocks, the data block’s WHERE Clause property is set. The general syntax for this is: fieldname = :control_block.text_item_name

  9. Refreshing the Data Block Values • In order to refresh the values of the data block to match the control block, the following commands are used: GO_BLOCK('ENROLLED_STUDENTS'); EXECUTE_QUERY; • The GO_BLOCK built-in navigates to the block, while EXECUTE_QUERY refreshes the data.

  10. Creating Forms with Multiple Canvases

  11. Creating Forms with Multiple Canvases • A well-designed form does not present too much information to the user at one time • Using multiple canvases helps to divide information into smaller pieces • There are two options for creating forms with multiple canvases: • The single-form approach • The multiple-form approach

  12. Creating Forms with Multiple Canvases • The Single-form Approach • This approach makes it easy to share data between the forms. • However, since only one form design file (.fmb) exists, only one programmer can work on the canvases at a time. • The multiple-form approach • involves the creation of a form design file for each canvas • This approach allows multiple developers to work on a project and facilitates the reuse of forms • However, it is more difficult to share information among the canvases.

  13. Working with Multiple Canvases and Data Blocks • When a form contains multiple canvases, it is necessary to specify the canvas on which a data block will appear • When each block item is added, the canvas should also be specified • It is common to create multiple data blocks when working with multiple canvases • This allows the data items to be grouped in small manageable units • It is also needed if there are two items with the same name, since items must have unique names within a data block

  14. Specifying the Block Navigation Order • When a form contains multiple canvases, the canvas that appears first is the canvas whose block items appear first under the Data Blocks node in the Object Navigator window • Notethat the order of the canvases is irrelevant; only the order of the blocks matters

  15. Referencing Different Canvases, Form Blocks, and Block Items • Forms Builder always displays the canvas containing the item with the form focus • Therefore, the GO-ITEM built-in can be used to display a different canvas by placing the focus on an item in that canvas • It is a good idea to always preface the item name with the block name using the format: block_name.item_name • If two items have the same name but reside in different blocks, and the GO-ITEM built-in references only the item name, a runtime error will occur

  16. Creating and Configuring Tab Canvases in Forms

  17. Creating and Configuring Tab Canvases in Forms • A tab canvas displays multiple canvases that the user can navigate between by clicking a labeled tab at the top of the canvas • They are convenient for organizing a lot of form items or allowing users to navigate through a series of steps

  18. Creating a Tab Canvas • Each tab canvas contains tab pages • Steps: • Creating the form • Creating a new content canvas in the form • Creating a tab canvas on the content canvas • Configuring the tab pages

  19. Creating Form Items on a Tab Canvas • Form items are placed on a tab page just like on any other canvas

More Related