|
|
|
|
|
|
|
Re: how to move text data contineously moved from right to left on oracle form [message #658685 is a reply to message #658683] |
Fri, 23 December 2016 02:52 |
|
nilesh@1985
Messages: 7 Registered: December 2016
|
Junior Member |
|
|
Steps :
1. Create Below Procedure in Program Unit
procedure prc_move_item (p_item varchar2,p_can varchar2)
is
w number;
x number; --Max (Canvas Width....)
y number:= get_item_property(p_item,y_pos); --Set Y Position of Move Item Where You See Your Item is Moving.......
a number;
can_width number;
diff_width number;
begin
a:= get_canvas_property(p_can, width);
can_width:=a;
diff_width:=(can_width-:global.item_width);
x := :global.x_pos + 1;
w := :global.w;
if x < can_width --(Canvas Width....) Start 1
then
if x < diff_width --(Canvas width - Item width)Maximum Move of X position of Move Item. Start 2
then
if w < :global.item_width --Item Width Start 3
then
set_item_property (p_item, width, w);
:global.w := :global.w + 1;
x := 0; --X Position still 0(zero) until item width 181.
end if; --end 3
set_item_property (p_item, position, x, y);
:global.x_pos := x;
else
w := :global.w - 1;
set_item_property (p_item, alignment, alignment_left);
set_item_property (p_item, width, w);
set_item_property (p_item, position, x, y);
:global.w := w;
:global.x_pos := x;
end if; --end 2
else
:global.x_pos := 0;
set_item_property (p_item, alignment, alignment_right);
end if; --end 1
end;
Step 2: Assign values to below in NEW-FORM-INSTANCE
:global.w :=get_item_property ('block.item_name',width); (get item width)
:global.can_width :=get_canvas_property('canvas_name',width); (get canvas width)
:global.item_width :=get_item_property ('block.item_name',width);
:global.x_pos:=0;
Also Create the following Timer in NEW-FORM-INSTANCE trigger.
declare
timer_id timer;
one_second number(7) := 50;
begin
timer_id := create_timer('move_time', one_second, repeat);
end;
Step 3: This following code paste into WHEN-TIMER-EXPIRED trigger.
if get_application_property(timer_name)='MOVE_TIME' then
prc_move_item('block.column_name','canvas_name');
Synchronize;
end if;
Change Item name which Item you want to move.
|
|
|
|