oracle forms :window and canvases

13
Controlling Windows and Canvases Programmatically

Upload: sekhar-byna

Post on 10-Feb-2017

785 views

Category:

Software


3 download

TRANSCRIPT

Page 1: Oracle Forms :Window and Canvases

Controlling Windows and Canvases Programmatically

Page 2: Oracle Forms :Window and Canvases

Objectives

• Display a form document in multiple windows• Write code to interact with windows• Manipulate windows programmatically• Window and Canvas Built-ins • Manipulate canvas views programmatically• Display large data blocks in a window

Page 3: Oracle Forms :Window and Canvases

Window Interaction Triggers

Trigger

When-Window-Activated

When-Window-Deactivated

When-Window-Closed

When-Window-Resized

Use

Enforces navigation

Deactivates a window

Closes a window

Maintains visualstandards

Page 4: Oracle Forms :Window and Canvases

Example

System Variable :SYSTEM.EVENT_WINDOW

IF :SYSTEM.EVENT_WINDOW=‘EMP_WIN’ THEN GO_BLOCK(‘DEPT’); SET_WINDOW_PROPERTY(‘EMP_WIN’,VISIBLE,

PROPERTY_FALSE);ELSE EXIT_FORM;END IF;

Page 5: Oracle Forms :Window and Canvases

Window Built-ins

• FIND_WINDOW• GET_WINDOW_PROPERTY• SET_WINDOW_PROPERTY• HIDE_WINDOW• SHOW_WINDOW• MOVE_WINDOW• RESIZE_WINDOW

Page 6: Oracle Forms :Window and Canvases

Canvas Built-ins

• FIND_CANVAS• GET_CANVAS_PROPERTY• SET_CANVAS_PROPERTY• FIND_VIEW• GET_VIEW_PROPERTY• SET_VIEW_PROPERTY• HIDE_VIEW• SHOW_VIEW• REPLACE_CONTENT_VIEW• SCROLL_VIEW

Page 7: Oracle Forms :Window and Canvases

Working with Tab Style Canvas

Page 1 Page 3Page 2click

• Uses either function key

• Next tab Page

• Previous Tab page

The When-Tab-Page-Changed triggerfires when a user:

• Clicks a tab

Previous Tab Page

NextTab Page

Page 8: Oracle Forms :Window and Canvases

Working with Tab Style Canvas

Tab canvas system variables:• :SYSTEM.TAB_NEW_PAGE• :SYSTEM.TAB_PREVIOUS_PAGE

Page 9: Oracle Forms :Window and Canvases

Built-ins for Manipulating Tab Canvas

• FIND_TAB_PAGE: Returns the tab page ID • GET_TAB_PAGE_PROPERTY: Returns

the tab page label or the tab page canvas• SET_TAB_PAGE_PROPERTY: Enables changing of the tab page

label

Page 10: Oracle Forms :Window and Canvases

Example

• Identify the topmost tab page

• Bring a tab page to the top programmatically

IF GET_CANVAS_PROPERTY(‘Dept_cv',TOPMOST_TAB_PAGE)= ‘Emp_page' THEN

SET_CANVAS_PROPERTY(‘Dept_cv', TOPMOST_TAB_PAGE,

‘Dept_page');END IF;

Page 11: Oracle Forms :Window and Canvases

Windows and Blocks

Window2

Block3

Active Window

Nonactive Window

CursorLocation

Window1

Block2

Block1

Page 12: Oracle Forms :Window and Canvases

Manipulating Windows Programmatically

• Maximizing MDI WindowSET_WINDOW_PROPERTY (forms_mdi_window,window_state, maximize);

• Setting Title for the WindowSET_WINDOW_PROPERTY (‘DEPT_WIN’, Title, ‘Department Application’);

• Location the Cursor windowGET_VIEW_PROPERTY (GET_ITEM_PROPERTY(NAME_IN(‘system.cursor_item’), item_canvas), window_name);

Page 13: Oracle Forms :Window and Canvases

Summary

• Controlling windows with system variable SYSTEM.EVENT_WINDOW

• Window Interaction triggers• Working with Tab Style Canvas

– SYSTEM.TAB_NEW_PAGE– SYSTEM.TAB_PREVIOUS_PAGE

• Different Window and Canvas Built-ins