Home » Developer & Programmer » Forms » Cursor Position in Forms 6i Multi-Line Text Item  () 1 Vote
Cursor Position in Forms 6i Multi-Line Text Item [message #156986] Mon, 30 January 2006 09:11 Go to next message
reddis
Messages: 12
Registered: January 2006
Location: US
Junior Member
Hi,

I am trying to position the cursor at the end of text item value, when I return to the text item.

Keep Cursor Position is set to Yes
and I also tried using the
SET_ITEM_PROPERTY('XXX.TEXT', KEEP_POSITION, PROPERTY_TRUE);
in when validate of the text item.

The purpose for this is, while typing in this multiline text field, I also hit some push buttons (which inturn appends text to this multiline text field). When I return to this text item, I have to manually navigate to the end of the text.

Is there a solution for this?

I am using Oracle forms version 6.0.8.19.1

Thanks,
Reddi
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157020 is a reply to message #156986] Mon, 30 January 2006 14:24 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Reddi,

Cursor at the end:

PROCEDURE Cursor_End( P_WindowName Varchar2 default null) IS
-- place cursor at the end of the current field
BEGIN
if P_Windowname is not null then
win_api_shell.sendkeys(
hWnd => get_window_property( 'WINDOW1' , WINDOW_HANDLE) ,
keys => '{RIGHT}',
RaiseExceptions => TRUE
);
else
win_api_shell.sendkeys(
hWnd => get_window_property( FORMS_MDI_WINDOW , WINDOW_HANDLE) ,
keys => '{RIGHT}',
RaiseExceptions => TRUE
);
end if;
EXCEPTION
when others then
null;
END;

Change {RIGHT} to {LEFT} to place cursorr at the beginning.

HTH
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157022 is a reply to message #156986] Mon, 30 January 2006 14:47 Go to previous messageGo to next message
reddis
Messages: 12
Registered: January 2006
Location: US
Junior Member
Thanks for your reply.

where can I get this win_api_shell.sendkeys package?

Should I apply a patch to get this package?
The server is running on HPUX 11.00

-Reddi
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157058 is a reply to message #156986] Tue, 31 January 2006 02:19 Go to previous messageGo to next message
vban2000
Messages: 207
Registered: March 2005
Senior Member
Hi Reddi

Its Oracle supplied package - Developer 2000 Web Utility

http://www.oracle.com/technology/software/products/forms/files/d2kwutil/d2kwutil_6_0_6_0.zip

Regards
AnDy
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157151 is a reply to message #156986] Tue, 31 January 2006 10:46 Go to previous messageGo to next message
reddis
Messages: 12
Registered: January 2006
Location: US
Junior Member
Thanks Andy, for ur reply, but that package is only for Windows platform.

Look for doc id: 122578.1 on metalink.

Thanks,
Reddi
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157153 is a reply to message #157151] Tue, 31 January 2006 10:53 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Unix on the server, but are your clients not on Windows?
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157154 is a reply to message #157153] Tue, 31 January 2006 10:56 Go to previous messageGo to next message
reddis
Messages: 12
Registered: January 2006
Location: US
Junior Member
Yes client is windows.

Should I attach it as a library?
If so can you tell me how to do that.

Thanks
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157155 is a reply to message #157154] Tue, 31 January 2006 11:05 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
Quick reply (dinner time!)

I presume you have downloaded the library!

In Forms developer, open the form you're working with. Select (click on) 'Attached Lbraries' in the object navigator. Click on the '+' icon.
Forms will ask you which library you want to attach to your form.
Look up the d2kwutil.pll (not the plx!) and click attach. Forms will ask you if you want to discard the path. Click Yes.

Now you can use the code I gave you. Look in the help for other windows based utilities.
Or -even better- in an empty form open the library ( a copy please..) and study the code.

HTH,
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157156 is a reply to message #157155] Tue, 31 January 2006 11:22 Go to previous messageGo to next message
reddis
Messages: 12
Registered: January 2006
Location: US
Junior Member
Hi RJ.Zijlstra,

Thanks for ur quick reply, I really appreciate it.
I did the same before my previous, it didn't work for me.

It compiles fine on the client side, but when I move it to custom_top and compile it there it is giving me the following error

Compilation error on procedure CURSOR_END:
PL/SQL ERROR 201 at line 5, column 3
identifier 'WIN_API_SHELL.SENDKEYS' must be declared
PL/SQL ERROR 0 at line 5, column 3
Statement ignored
PL/SQL ERROR 201 at line 11, column 3
identifier 'WIN_API_SHELL.SENDKEYS' must be declared
PL/SQL ERROR 0 at line 11, column 3
Statement ignored


Should I place the .pll's in $AU_TOP/resource folder?
or some where on the server and compile them?

Thanks
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157167 is a reply to message #157156] Tue, 31 January 2006 13:02 Go to previous messageGo to next message
RJ.Zijlstra
Messages: 104
Registered: December 2005
Location: Netherlands - IJmuiden
Senior Member
I never used custom-top, so I cannot help you any further.

Good Luck!
Re: Cursor Position in Forms 6i Multi-Line Text Item [message #157168 is a reply to message #157167] Tue, 31 January 2006 13:08 Go to previous messageGo to next message
reddis
Messages: 12
Registered: January 2006
Location: US
Junior Member
Thanks a lot Zijlstra,

I am just waiting if anyone who worked in Oracle Apps forms can help me out.

-Reddi
icon3.gif  Re: Cursor Position in Forms 6i Multi-Line Text Item [message #623844 is a reply to message #157020] Mon, 15 September 2014 06:42 Go to previous message
feno_noga
Messages: 4
Registered: September 2014
Location: Egypt
Junior Member
you are the best, man. thanks this worked like magic Smile
Previous Topic: Oracle Form 10g Plugin issue
Next Topic: FND_REQUEST.SUBMIT_REQUEST
Goto Forum:
  


Current Time: Tue Apr 23 01:34:32 CDT 2024