Close Window with ESC key (OpenInsight Specific)
At 30 JAN 2002 02:40:25PM Jorge Ubaldini wrote:
I use ESC key like AREV to close window. I's works fine, but no when
the focus is in Edit Table.
Any suggestions?
Other:
How I print on the screen any text like INIT.VIEW (AREV).
At 30 JAN 2002 04:20PM Donald Bakke wrote:
Jorge,
ESC keystrokes are intercepted by the edittable control unless the edittable is protected (which makes the edittable un-editable.) I don't think you will be able to get this to work.
There are many ways to print to the screen. If you are trying to create on-screen reports then the best approach would be to use the OIPI functionality and create preview reports. You can send text to a control, like a textbox, if you want a simple display of data. There are other options as well but I don't want to waste space until I have a better idea of what you want to do.
At 30 JAN 2002 05:40PM Matt Sorrell wrote:
Donald,
It's been quite a while since I've played with OI, and I didn't do it much. But, couldn't you code either a custom event or a promoted event for the edittable that checked the keystrokes? If the keystroke was chr(27), forward that to the form or just close the form.
I'm not sure how workable that is, but it should be possible. One other thought I just had. Does OI support a KeyPreview event like Visual Basic does? If you are not familiar with it, what this does is allow an event at the form level to trap all keystrokes before they are sent to the control with the focus. This way you can enforce business logic and other things for acceptable, or special processing, keystrokes. If OI had such an event, you could trap for chr(27) there.
Just a few thoughts.
At 10 FEB 2002 01:01PM Bob Silverstein wrote:
If window means form, then this is how I did it. When in the form designer, add a menu item with the escape key and &esc. Mark it hidden. Save this and go to the quick event builder. Find the escape event and select "close window".
At 11 FEB 2002 07:48AM Bob Watson wrote:
The edittable swallows keys like esc and F2 - they are indetectable making it difficult to introduce fine control to edittable functionality. For this reason I populate all my databound et's from add,select,delete etc.. buutons which call dialogs.
Bob Watson
At 12 FEB 2002 11:01AM Oystein Reigem wrote:
Bob,
Not true that the edit table swallows F2 completely. It's correct that F2 makes the edit table do its F2 thing, i.e, switch from overwrite to edit mode, but you can trap F2 afterwards with a menu event. I use F2 as a general popup keystroke instead of Alt+Down. After the user has selected from the popup and focus is back to the edit table, mode is back to overwrite. It's only if you follow closely you can see the brief mode switch.
But the Esc problem is a nuisance for sure. I hope eventually OI32 allows a different grid control and makes the edit table redundant.
- Oystein -
At 12 FEB 2002 12:58PM Donald Bakke wrote:
Oystein,
I use F2 as a general popup keystroke instead of Alt+Down. After the user has selected from the popup and focus is back to the edit table, mode is back to overwrite. It's only if you follow closely you can see the brief mode switch.
Same here…which is why we remap the editmode keystroke from F2 to F4. This way F2 is purely for the OPTIONS event only.
At 12 FEB 2002 08:59PM Oystein Reigem wrote:
Don,
Ah. So should I have done. I assume I have it written on my To Do list, which is somewhere on my desk buried beneath my Do This First and Not Before You've Done This lists.
- Oystein -