Detecting a Quick Event? (OpenInsight Specific)
At 31 MAR 1998 05:54:28PM Jeff Blinn wrote:
Has anyone worked out an easy way to determine which controls have a quick event associated with them?
For example: we would like to indicate to the user if the control they are on has an option quick event associated with it.
Is there a way short of reading through the window source code?
Thanks,
Jeff
At 31 MAR 1998 06:53PM Don Bakke wrote:
Jeff,
Events=Get_Property(CtrlEntId, "ORIG_STRUCT")Returns an @SVM delimited list of events associated with the control.
At 01 APR 1998 12:02PM Gregg Tate wrote:
Do you habve to do this 'on the fly' or, can you get by with putting a visual clue into your window design to indicate that a control will have option event. ie., put a border around the control which will have option and don't put a borderaround the control if ther is no option
just a thought
gregg
At 02 APR 1998 12:27AM Dave Pociu wrote:
Jeff,
In my applications I have standardized to displaying every control that has options in a light beige. I do this with a global Gotfocus event. The first time any control gets focus in a window (which is when the window is created usually), the global Gotfocus "hunts down" (through the window definition as well as using Repository( "GETSUB" , …) ) all Quick and Script Options events. Then for each control with Options that initially has a white background, it will turn the background to light beige.
I found this solution to be very simple, elegant and self-adjusting. I don't have to worry about the color of the field at design time if the field has Options; just leave the background white and the global Gotfocus will change its color automatically when the window is executed.
So as you can see, I still needed to go to the window definition to "hunt down" the option fields, but only for one global script.
Hope this gives you some ideas
Dave Pociu