Solved

Drop & Drag in Forms

Posted on 2002-07-23
2
399 Views
Last Modified: 2012-06-21
I can get the drop & Drag feature to work in forms. Does anyone know if it works on the web I cant seem to get it to work?

0
Comment
Question by:Maritimer
2 Comments
 

Author Comment

by:Maritimer
Comment Utility
Found the answer on the oracle site
0
 
LVL 14

Accepted Solution

by:
leoahmad earned 50 total points
Comment Utility
Hi Meritimer,

Place some items(like buttons ) on a form and put the following codes at form level triggers:

(1) When-new-form-instance trigger:

DECLARE
D BOOLEAN;
BEGIN
:GLOBAL.D:='FALSE';
END;

(2) When-mouse-down trigger:

DECLARE
I ITEM;
N NUMBER;
BEGIN
:GLOBAL.D:='TRUE';
I:=FIND_ITEM(:SYSTEM.MOUSE_ITEM);
:global.item:=i.id;
EXCEPTION
WHEN OTHERS THEN
MESSAGE('NO ITEM CLICKED');
:GLOBAL.D:='FALSE';
END;

(3) when-mouse-up trigger:

:GLOBAL.D:='FALSE';

(4) when-mouse-move trigger:

declare
i item;
p number;
P1 NUMBER;
begin
if :global.d='TRUE' then
i.id:=to_number(:global.item);
p:=get_item_property(i,x_pos);
set_item_property(i,x_pos,p+:system.mouse_x_pos);
p1:=get_item_property(i,y_pos);
set_item_property(i,y_pos,p1+:system.mouse_y_pos);
else
null;
end if;
end;

After writing the code run the form and select any item on the form click on it and now you can easily drag and drop this item.
These trigger impliment the drag and drop facility.
You can use it at any form.




0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now