Solved

Drop & Drag in Forms

Posted on 2002-07-23
2
405 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
ID: 7172338
Found the answer on the oracle site
0
 
LVL 14

Accepted Solution

by:
leoahmad earned 50 total points
ID: 7173148
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
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 syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

867 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

12 Experts available now in Live!

Get 1:1 Help Now