Cursor Position in Forms 6i Multi-Line Text Item [message #156986] |
Mon, 30 January 2006 09:11 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 #157155 is a reply to message #157154] |
Tue, 31 January 2006 11:05 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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 message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
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
|
|
|
|
|
|