Home » Developer & Programmer » Forms » keypress erases everything (6i, xp)
keypress erases everything [message #401370] Mon, 04 May 2009 05:50 Go to next message
rzkhan
Messages: 345
Registered: March 2005
Senior Member
I am facing one of the bad scenario:



I have four text items.
AddressLine1, AddressLine2, AddressLine3, AddressLine4

when a user enters text in the first field. It should automatically move the last incomplete word to next Field.

To achieve this functionality, I have used the following code with POST-TEXT-ITEM of all the first three text items.




Here is my code

declare 
pos number := instr(:bsd.plas1,' ',-1,1);
ch1 varchar2(30);
ch2 varchar2(30);
begin

if pos > 23  then 
begin
ch1 := substr(:bsd.plas1,pos);
ch2 := substr(:bsd.plas1,0,pos);
:bsd.plas1 := ch2;
:bsd.plas2 :=rtrim(ch1);

end;
end if;

end;





It works fine, but creating another problem.

As soon the input focus moves to next item, the entire text already available is selected and an accidental keypress erases everything (Yeh, I m not smart enough to control this situation)



Please help me..anyone

Riaz


Re: keypress erases everything [message #401372 is a reply to message #401370] Mon, 04 May 2009 06:04 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell, Forms is incapable of doing that by itself. If they existed, KEY-END, KEY-HOME or even DO_KEY('LEFT') would do the job. However, as they do not, I'm afraid that you'll have to write a piece of Java code which will handle the situation.
Re: keypress erases everything [message #401422 is a reply to message #401370] Mon, 04 May 2009 22:09 Go to previous message
rzkhan
Messages: 345
Registered: March 2005
Senior Member
Here is a solution to the problem. I want to share with you people.

http://it.toolbox.com/wiki/index.php/Dealing_with_multi-line_text_items


But one question.

How Can I attach the d2kwutil.pll to the form ?


Riaz
Question moved to http://www.orafaq.com/forum/m/401424/67467/#msg_401424 by DJM

[Updated on: Wed, 06 May 2009 20:54] by Moderator

Report message to a moderator

Previous Topic: Query the record based on date
Next Topic: How to delete some last record on a non-database block(tabular)
Goto Forum:
  


Current Time: Sat Dec 10 16:37:48 CST 2016

Total time taken to generate the page: 0.04735 seconds