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 Form
first thing is clear, the those columns which is fixed would be placed on Content Canvas and th OSE column which is scrollable would 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 all and width is, hence the stacked canvas Viewport X Position would b E + 1
set Viewport X Position =----"
The first column Empno y is 172, hence the stacked canvas Viewport Y Position would be 172-10 (Prompt height)
Set Viewport Y Position = 162
Set the Viewport Width using following formula:
Sal column X Position (218)-First column Empno x+width (60)-4 = 154
Set Viewport Width = 154
Set the Viewport Height as per the number of items displayed on content canvas.
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