Home » Developer & Programmer » Forms » URGENT!
URGENT! [message #86482] Mon, 04 October 2004 22:19 Go to next message
hasan
Messages: 10
Registered: October 2000
Junior Member
Hello,
I have a problem. When the users typing something in a text field, the mouse cursor jump to the begin of the text. I tried with set_item_property (keep_position).

Can anyone help me with this problem.

Thanks
Hasan
Re: URGENT! [message #86492 is a reply to message #86482] Tue, 05 October 2004 05:00 Go to previous message
Himanshu
Messages: 457
Registered: December 2001
Senior Member
Hi,
What you require can be achieved using the D2kwutil utility.

Eg. in the example, you want the cursor to be placed in the eighth position
after 13 in the date.
In the When-New-Item-Instance,you can give the code -

declare
hMDIWin PLS_INTEGER;
begin
hMDIWin := get_window_property(FORMS_MDI_WINDOW,
WINDOW_HANDLE);
Win_API_Shell.SendKeys(hMDIWin, '{Home}+{Right 3}',
TRUE);

end;

This is so cursor goes to the beginning of the item and then moves right by 8 places.

The only problem over here will be that the already entered text will remain highlighted.
In order to overcome this you may use following method:
DECLARE
v_handle pls_integer;
BEGIN
win_api_shell.sendkeys(V_HANDLE,'{home}',FALSE);
END;

The above code will result in no highlighting occurring and the cursor will
be placed on the first character of the item. If you wish the cursor to appear
at the end of the item, replace the word ?home? to ?end?.

Note that this solution will only work on windows in a client server
environment.
For a web solution you will have to create a java bean that will perform the
necessary functionality.

To use the utility to prevent highlighting of an item simply accomplish the
following steps:
1. Ensure the d2kwut60.dll is in your Forms Oracle Home/bin directory.
2. Ensure the d2kwutil.pll is attached to your form and in your Forms60_path.
3. Place the above written code within a when-new-item-instance trigger on
the item(s) you wish to disable highlighting.

HTH
regards
Himanshu
Previous Topic: need help?
Next Topic: re : Querry urgent
Goto Forum:
  


Current Time: Wed May 29 06:30:45 CDT 2024