Capturing Char w/ Edit Control (OpenInsight Specific)
At 18 FEB 1998 03:21:24PM Bryan Feddish wrote:
Is there any way to capture a down arrow, return or right-click in and edit table control? I can't seem to use QUALIFY_EVENT for the edit table. Is this due to it being a 3rd party control?
Thanks,
Bryan
At 18 FEB 1998 09:30PM Don Bakke wrote:
Capturing particular keys within the edittable has so far eluded me (and no one has yet spilled any secret knowledge to me!) but you can right click in an edittable. The second to the last SENL provides code for doing so within Win95. If you don't get SENL let me know and I'll post the code (with permission of course !)
dbakke@srpcs.com
At 19 FEB 1998 05:54AM Bob Watson wrote:
No theres no way and yes it is because its a 3rd party control.
Is Revsoft going to include the fixes for ET's in 3.6?
Bob Watson
At 19 FEB 1998 09:30AM Don Bakke wrote:
Bryan (and others interested):
Below is a snippet from Sprezzatura's Electronic Newsletter Volume 1 issue 10. You may get the whole enchilada (or full monty ) at www.sprezzatura.com as well as request a free subscription to this worthy piece (there, I hope that satisfies my copyright obligations!) -
Qualify_Event
Next it was time to RAVE about Qualify_Event. I think if you were to
press Carl Aaron and self we'd probably give this props as being our
favourite new feature of all time! Originally Qualify_event was
designed to permit developers to influence the event chain by deciding
what gets done when - the eighth concentric ring of maintenance hell.
Now it has been extended to permit the trapping of ANY Windows
message.
So as an example, suppose you wanted to trap a right mouse click on an
edit table so that you could display a Zoom window or a context menu?
Easy. On the create event of the Window, tell the system that you want
to look for the right click message on that particular edit control.
Now whenever the user right clicks on that particular edit control the
WINMSG event will be triggered for that control. You'll be told the
message that got you there and any supporting information and you can
then do what you want! In our case we had code to show a full Hospital
address when the hospital was right clicked on and our two pieces of
code were as follows…
Code for Create Event of Window
Function Create(CtrlEntId, CtrlClassId, CreateParam)
/*
So the Window is called PATIENT, the edit table iscalled HOSPITAL. The Windows message triggered bya right click is 0x7B, so we tell the control tolet us know when that happens.Note that this won't work with Windows 3.1 as it isa 95 specific message. There are ways of making it workfor 3.1 of course...*/
Call Send_Message("PATIENT.HOSPITAL", "QUALIFY_EVENT", "0x7b", 1)
RETURN 1
and the code for the WinMsg event on the Patient.Hospital control
Function WinMsg(CtrlEntId, CtrlClassId, hWnd, Message, wparam,lparam)
CtrlArray = @Window : ".HOSPITAL"PropArray = "TEXT"DataArray = Get_Property(CtrlArray, PropArray)HospNo = DataArray1, @RmRow = Xlate("HOSPITAL", HospNo, "", "X")Swap @Fm With \0D0A\ In RowSwap @Vm With \0D0A\ In RowCall Msg(@Window, Row)Return
This is SO COOL!!!
dbakke@srpcs.com
At 19 FEB 1998 10:52AM Andrew P McAuley wrote:
See you in court…
Thanks - saved me doing it….
amcauley@sprezzatura.com
World Leaders in all things RevSoft