In this tutorial you'll learn to create horizontal scrollable tabular or detail data block by using stacked canvas in or Acle Forms.
As shown in below picture the first column Empno was fixed and middle columns ename, Job, Mgr and HireDate are scrollable a nd last Columns Sal, Comm, Deptno is fixed which is right side. Download FormFirst thing is clear, the those columns which is fixed would be placed on Content Canvas and those column which AR E scrollable'll be placed on stacked Canvas.
Now the main part was to set the positioning of stacked canvas items and content canvas items and the position of stacked C Anvas and for this I'll tell you to set some important properties of the items and stacked canvas.
To set the stacked canvas position and scrollable area stacked canvas, which you had to note down the properies of the Followin G Items:
1. The X and Y position and the Width of the first fixed column Empno which is in this case:X =
Y = 172
Width =
2. Note down the X property of first right side column Sal, which is:
X = 218
Now we have the property values and what we need to do are some calculation to get the exact placement of stacked Canvas an D The following is the formula:
The first column Empno x is a and width is, hence the stacked canvas Viewport X Position would be 15 + 45 + 1Set Viewport X Position =
The first column Empno y is 172, hence the stacked canvas Viewport Y Position would be 172-10 (Prompt height) Set Viewpor T Y Position = 162 Set The Viewport Width using following formula:sal column X Position (218)-First column Empno x+w Idth-4 = 154 set Viewport Width = 154 Set the Viewport Height as per the number of items displayed on content can Vas. Now your scrollable stacked canvas are ready and I am attaching the form including EMP table script so this you download an D take the reference from it. Download this form using the this link from Google drive: Stacked.zip
Create stacked Canvas to Scroll horizontal tabular Data Blocks in Oracle Forms