Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving cursor to the end of text item in Oracle Forms

Status
Not open for further replies.

thebelf

Programmer
Nov 7, 2001
3
US
I have a text item of which I want to move the cursor to the end--similar to what the 'end' keypress will accomplish when typing in a text item.

Is there any ideas of how to either program a keypress of the 'end' key or move the cursor to the end of the text item?
 
Place the following code within a when-new-item-instance trigger on the
item(s) you wish to disable highlighting:

DECLARE
v_handle pls_integer;
BEGIN
win_api_shell.sendkeys(V_HANDLE,'{end}',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 start of the item, replace the word ‘end’ to ‘home’. For more information,
please refer to the d2kwutil documentation.

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.

Thanks to OTN
 
Thank you pani2304. It took me a while to get it to work--to find and attach the library and such. But it does work and I want to thank you for your response.

thanks,

thebelf
 
Does this work only for single line text items - I've got a multi-line text item that I'd like to achieve similar results with a multi-line text item - but even with the necessary trigger code added it doesn't appear to work - still get the nasty highlighting - I'm also guessing that the sending the 'END' key would only get me to the end of the current line, rather than to the end of the entire piece of text......

.. any ideas...?
 
Apologies - this now seems to be working reasonably well in my form now that I've set the 'Keep Cursor Position' of the multi-line text item to YES.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top