Solved

Drop & Drag in Forms

Posted on 2002-07-23
2
432 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Introduction A previously published article on Experts Exchange ("Joins in Oracle", http://www.experts-exchange.com/Database/Oracle/A_8249-Joins-in-Oracle.html) makes a statement about "Oracle proprietary" joins and mixes the join syntax with gen…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

707 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