{{tag>category:"OpenInsight Specific"}} [[https://www.revelation.com/|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]] ==== OI Options Event (OpenInsight Specific) ==== === At 20 AUG 1998 01:05:15PM Greg James, ISIS, Inc. wrote: === The current application we are working on contains numerous forms with controls that may or may not have OPTIONS functionality associated with them. I would like to be able to display a label in the bottom of the form when a control that has OPTIONS functionality has focus. Does anyone know of a good way to accomplish this? Thanks. ---- === At 20 AUG 1998 01:55PM Dave Pociu wrote: === Yes, My application is doing this for any control that has the GOTFOCUS event. Basically, I have a global application GOTFOCUS event ( APPLICATIONNAME*GOTFOCUS* ) that checks if the respective control has a quickevent or a script defined for it. If so it puts up a message. Also, the first time a control gets focus in a window, all controls that have options defined, along with a white background have their background color turned a light beige. This gives the entire application a very consistent look with no extra work. The only caveat is that there are controls that do not issue a GOTFOCUS so there it would be your decision how to handle them. I hope this is the idea that you were after. Dave ---- === At 20 AUG 1998 04:14PM Greg James, ISIS, Inc. wrote: === Dave, Thanks for the tip. What property do you use to tell if a control has a QuickEvent or a script associated with it? Greg ---- === At 20 AUG 1998 08:40PM Dave Pociu wrote: === Here's the relevant piece of code that identifies the controls that have OPTIONS. If you need more help, e-mail me at d.pociu@snet.net EntID=@appid:"*OIWIN**":(@window1,'F*') WinID=@appid:"**":(@window1,'F*') Events=get(@window,"@EVENTS") if Events=' then w=XLATE("SYSREPOSWINS" , WinID , '' , 'X') w=field(w , @rm , 3) num_li=fieldcount(w , @fm ) q=' for i=1 to num_li locate "OPTIONS" in w using @svm setting pos then q=@appid:"*OIEVENT*OPTIONS*":(@window1,'F*'):".":w end next i Events=Repository("GETSUB",EntID) if Events # '' then Events := @fm Events := q end else Events=q end = set(@window,"@EVENTS",Events) num_events =count(Events,@fm) + (Events # '') for i=1 to num_events Type=field(Events[i],'*',3) if Type _EQC "Options" then ControlID=field(Events[i],'*',4) ControlID=@window:".":field(ControlID, '.' , 2) end next i end Enjoy! ---- === At 23 AUG 1998 11:52PM Don Bakke wrote: === Hi Greg, Dave gave you a pretty thorough piece of code that can provide a lot of information. If you are looking for a quick way to tell if a control has an OPTIONS event, the following is what we use: Events=Get_Property(CtrlEntId, "ORIG_STRUCT") If Index(Events, "OPTIONS*", 1) then /* Control has an OPTIONS event */ end else /* Control does not have an OPTIONS event */ end dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] ---- === At 24 AUG 1998 01:28PM Dave Pociu wrote: === Don, The reason why I use that code is so I can identify all the controls with Options the first time a window is started (and GOTFOCUS fired) and change their backcolor. I also store those control ids in an @ property of the window at that time and look in there afterwards. But you are 100% correct: if all there's needed is a "This control has options" message when the control gets FOCUS, then your code is definitely the one to use. ---- === At 27 OCT 1998 02:55PM GCJ wrote: === gjames@cyberhighway.net onmouseover=window.status=email greg james;return(true)" [url=http://www.isisicor.com]International Severity Information Systems, Inc.[/url] [img]http://www.isisicor.com/isislogo.gif[/img] [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=BA513A1F673A596D85256666005DDD80|View this thread on the forum...]]