Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 19 DEC 1997 11:03:45AM Dave Pociu wrote:

I need to duplicate some functionality that I see in Table Builder.

In the edit table there, if the Delete key is pressed, it looks like the message "Are you sure…." comes up BEFORE the row actually gets deleted. There is no flicker that would indicate that the row is actually deleted and put back before the message comes up.

I presume that the table is actually marked as protected, which would disable the automatic deleting and inserting of rows, but somehow the Del character is still intercepted.

I have tried several things including a menu shortcut but I cannot seem to be able to intercept the Del character unless I am in edit mode in one of the cells.

Can you post some sort of a hint on how that is done ?

Much appreciated


At 19 DEC 1997 12:37PM Greg wrote:

Here are some things that you could try:

This may but be too professional but…

You could place a hidden menu event on the form that captures the Del Key, and then place some script in the event that calls a msg box when that button is pressed.

Or…

You could look at this article in the Knowledge Base, Catching a Right mouse click and other Windows events it should give you some helpful hints on performing this action.


At 20 DEC 1997 03:06PM Aaron Kaplan wrote:

OI 3.4 or 3.5 introduced DELETEROW and INSERTROW events so you can trap INS and DEL keystrokes.

[email protected]

Sprezzatura Ltd

www.sprezzatura.com_zz.jpg


At 22 DEC 1997 09:57AM Dave Pociu wrote:

Thanks for the suggestions so far guys but here's the deal:

My edit table takes up a big portion of the screen so if I intercept the Delete or Inser keys AFTER a row is deleted or inserted, when I put it back and ask "Are you sure …." there is an annoying flicker caused by the re-painting of the EditTable on such a big portion of the screen.

So what I need is to intercept the Delete and Insert keys BEFORE any modification is made to the table. Can you help me with that? (The table builder form seems to do exactly what I need. Does anyone know how that is implemented? )

Here's why I cannot use the suggestions so far:

- INSERTROW and DELETEROW occur AFTER the changes are made.

- A menu item with Del as the shortcut does not get fired when the table is protected. If the table is not protected I'm in the same predicament as with INSERTROW and DELETEROW.

- I don't have an API book handy to be able to extract the hex code corresponding to Ins and Del


At 22 DEC 1997 12:06PM Cameron Revelation wrote:

Dave,

You are correct that the DELETEROW and INSERTROW events will only fire after the action takes place. I suggest setting the edit table to protected (from the "More…" button under Edit Table properties) and adding some explicit action, either push button or menu item, to add or remove items from the table. See the Purchase Order example in the EXAMPLES application for a simple idea of what I mean.

Cameron Purdy

Revelation Softwarre


At 22 DEC 1997 12:53PM Don Bakke wrote:

Dave,

- I don't have an API book handy to be able to extract the hex code corresponding to Ins and Del

#define VK_INSERT 0x2D

#define VK_DELETE 0x2E

However, I'm still not sure how you will be able to get what you want this way. I have not found a universal way to trap keys in the edittable.

[email protected]

SRP Computer Solutions

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/3e537d19607fbea08525657200583bf6.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1