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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extending the default F2=Delete function

Status
Not open for further replies.

uhu

IS-IT--Management
May 21, 2003
40
NZ
Hi everyone,

I need some help in extending F2 Delete functionality.

I need F2 to do more than just delete a row in the screen array. Basically I need F2 to delete a row in the screen array and then move the cursor to the first column (Informix default made the cursor to stay in the current column).

Is there a way of doing such thing without having to do a custom delete function & reshuflleing of the array ?
Is there any built in function that check whether F2 is pressed other than the "ON KEY(F2)" ?

Thanks in advance,

Vito
 
Vito,

In array, screen interaction statement, the default delete hotkey is function key "F2". 4GL has the capability to to reassign other key or combination of keys to replace the original key definitions using OPTIONS statement, for example,

options
delete key control-d

Input array statement has many form management blocks to care of the field level validations and manipulations. One such block is AFTER DELETE, which can be used to implement your requirement. Assuming your first column is "a", the example below illustrates the logic in simple manner.

input array program_array without defaults from screen_array.*
attribute (insert row=1,delete row=1)
on key (accept)
exit input
after delete
next field a
end input

Regards,
Shriyan
"Attitudes are contagious. Are yours worth catching?"
 
Hi Shriyan,

Thank you SOOOO MUCH !!
That's exactly what i'm lookin for...
too bad i've compeleted the reshuffleing of the array..
but i'll defintely use that method next time, and i'm gonna test the AFTER DELETE on Monday.

cheers
vito
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top