A very common issue we face that how we center our forms in Oracle Forms MDI Window. In order to track this issue, following code can be use in Form-Level Trigger WHEN-WINDOW-ACTIVATED
Declare
v_Window Varchar2(1000) := 'MAIN';
v_Width Number(4);
v_Height Number(4);
v_MDI_Wth Number(4);
v_MDI_Hth Number(4);
Begin
Set_Window_Property(Forms_Mdi_Window, Window_State, Maximize);
v_MDI_Wth := Get_Application_Property(Display_Width) - 50;
v_MDI_Hth := Get_Application_Property(Display_Height) - 140;
v_Width := Get_Window_Property(v_Window, Width);
v_Height := Get_Window_Property(v_Window, Height);
Set_Window_Property(v_Window,
Position,
(v_MDI_Wth - v_Width) / 2,
(v_MDI_Hth - v_Height) / 2);
End;
Declare
v_Window Varchar2(1000) := 'MAIN';
v_Width Number(4);
v_Height Number(4);
v_MDI_Wth Number(4);
v_MDI_Hth Number(4);
Begin
Set_Window_Property(Forms_Mdi_Window, Window_State, Maximize);
v_MDI_Wth := Get_Application_Property(Display_Width) - 50;
v_MDI_Hth := Get_Application_Property(Display_Height) - 140;
v_Width := Get_Window_Property(v_Window, Width);
v_Height := Get_Window_Property(v_Window, Height);
Set_Window_Property(v_Window,
Position,
(v_MDI_Wth - v_Width) / 2,
(v_MDI_Hth - v_Height) / 2);
End;
No comments:
Post a Comment