iSelfSchooling.com - Since 1999  References  |  Job Openings  |
    Home  | Search more  | Oracle Syntax  | Instructor-Led in Class   | (Members to access to VIDEOS)
 

Copyright & User Agreement

   Suggestions Email2aFriendHomepage us! |  Bookmark

Services

  Vision/Mission

  Services

  Biography

  Contact Us

 FREE Training

  Start...

  SQL

  PL/SQL

  Forms 

  Reports

  DBA Fundamentals

  Performance

  Prepare for OCP

  ShareUrNotes

...

  Acknowledgement

  Who is who

  University Directory

  Links...

 

 

 

Topics:  Hands-On 07 - Horizontal Toolbar, Push Button, Trigger (when-button-pressed)

Adding more functionality to the application.

The client needs a horizontal toolbar to have on their Form.  The toolbar should contain all the frequently used options. This will make ease of use of some options.

The following are the list of all the frequently used functions they expect to use:

Move to previous record,

Move to next record,

Add new record,

Delete current record,

Save work, and

Exit the application.

In this Hands-On, you will learn how to:  create and use horizontal toolbar, create and use push button item, create "WHEN-PUTTON-PRESSED" trigger,  write and compile trigger.

 

More Resources by Google:

Manuscript

Save the Form name as version 7.

 

Expand "Canvases" and click on the "create" icon.

Open the new canvas property palette.

Change “name” to "PB_BLOCK.”

Change "Canvas type" to "Horizontal toolbar."

Close the window.

 

Open the PB_BLOCK canvas layout.

Notice that, it is too big to be the "horizontal toolbar" canvas.

Change the size.

 

Navigate through these two canvases.

 

Expand “Data Blocks” and Create a new "data block manually."

Open its Property Palette.

Name it the same as the "Horizontal toolbar” canvas.

Change "Database Data Block" to “NO.”

Then close the window.

 

Create and resize a push button.

Be sure that the default block is PB_BLOCK.

Copy and paste the push button item five times.

 

Open the first "push button" property palette.

Change "name."

Blank the "label."

Set “iconic” to "yes."

On “Icon Filename,” type "w_prev."  This is an oracle reserve word.

Change "Keyboard Navigators" and "Mouse Navigators” to “NO.”

Then close the window.

 

Repeat the process for the rest of the push button items.

 

Change name to a more meaningful naming convention.

On “Icon Filename,” use "w_next" for next record.

Change name to a more meaningful naming convention

On “Icon Filename,” use "addrow" for adding a record.

Change name to a more meaningful naming convention

On “Icon Filename,” use "delrow" for deleting a record.

Change name to a more meaningful naming convention

On “Icon Filename,” use "save" for saving the application transactions.

Change name to a more meaningful naming convention

On “Icon Filename,” use "exit" for exiting the application.

 

While holding the control key, click on the objects you want to select.

And then open their property palette.

Change “height” to 20 and press the enter key. 

Close the window.

 

Make some layout adjustments if needed.

Notice that these push buttons have no functionality.

--

Navigate through the layout screen to do your changes if needed and then create the triggers.

 

Create a "WHEN-BUTTON-PRESSED" trigger for the previous push button item.

 

Type "previous_record.”

Then compile it.

Successfully compiled. 

Make a typo error to see the error messages.  Correct the error and compile it again.  Then close the window.

 

Repeat this process for all the other triggers.

Notice on different ways of doing this.

 

Done.

Check the application layout.

 

Then run the application.

 

Here, the only canvas you can see is: the horizontal toolbar canvas.  There is no indication of the other canvas.  You should drag the window to see the other canvas.

 

You can either close the window or drag to resize the window to use the “Customer’s Order” application.

Resize the window and execute the query.

Test the push button functionality.

 

After the testing is done, close the window and save the changes.

 

Now, you should practice this over and over, until you become a master at it.

Good Luck.

 

 
 
Google
 
Web web site