Home » Developer & Programmer » Forms » Unable to align items from one Canvas with another Canvas when the Form loads (Forms 12.2.1.4.0; DB:12.1.0.2.0; O/S: Windows 10 pro )
Unable to align items from one Canvas with another Canvas when the Form loads [message #683866] Fri, 26 February 2021 14:41 Go to next message
buggleboy007
Messages: 282
Registered: November 2010
Location: Canada
Senior Member
I am stuck in a problem and that is:

a) I have 1 window with many canvases. On one of the canvas(CG$PAGE_1; content canvas) I have one text box. On another canvas (CG$SPREAD_TABLE_1; stacked canvas) I have many text boxes.

When the Form loads, I am unable to align text boxes from CG$SPREAD_TABLE_1 canvas with CG$PAGE_1 canvas.

The procedure that aligns the canvas is:
PROCEDURE CGLY$RAISE_CANVAS(

 P_CANVAS IN VARCHAR2) IS /* Current canvas */

/* Raise the current canvas, plus any dependant canvases to the top */

BEGIN

 SET_VIEW_PROPERTY(P_CANVAS, VISIBLE, PROPERTY_ON);

 IF ( P_CANVAS = 'CG$PAGE_1') THEN

   SET_VIEW_PROPERTY('CG$SPREAD_TABLE_1', VISIBLE, PROPERTY_ON);

  END IF;

END;
I have tried the below options but nothing seems to be working. What can be done to rectify this issue?
--  Set_View_Property('CG$SPREAD_TABLE_1', VIEWPORT_Y_POS_ON_CANVAS, 150);

  -- Set_view_property('CG$SPREAD_TABLE_1',width,12.4); --sets the viewport_width of the canvas

  --Set_view_property('CG$SPREAD_TABLE_1',height,1.94); --sets the viewport_height of the canvas

   --Set_View_Property('CG$SPREAD_TABLE_1', VIEWPORT_Y_POS_ON_CANVAS, 140);

Note: I have posted the same question on:
https://community.oracle.com/tech/developers/discussion/4481363/unable-to-align-items-from-one-canvas-with-another-canvas-when-the-fo rm-loads#latest
Re: Unable to align items from one Canvas with another Canvas when the Form loads [message #683867 is a reply to message #683866] Fri, 26 February 2021 15:48 Go to previous message
buggleboy007
Messages: 282
Registered: November 2010
Location: Canada
Senior Member
I think I cracked the issue using:
Set_View_Property('CG$SPREAD_TABLE_1', VIEWPORT_Y_POS, 2.79);
(instead I was using
Set_View_Property('CG$SPREAD_TABLE_1', VIEWPORT_Y_POS_ON_CANVAS, 140);
)

Now using
Set_View_Property('CG$SPREAD_TABLE_1', VIEWPORT_Y_POS, 2.79);
, the output looks legible. Oracle Forms manual helped me.

You can refer to the post in Oracle Community to see the output.
Previous Topic: Form Error : Can not Read file finance_payroll
Next Topic: Stacked Canvas distorting when clicked
Goto Forum:
  


Current Time: Thu Mar 28 12:59:03 CDT 2024