[[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]] ==== Dialog call detect (OpenInsight Specific) ==== === At 21 MAY 1999 09:10:19PM Barry Stevens wrote: === {{tag>"OpenInsight Specific"}} I am wanting to automatically put a save button accros the bottom of a window (and increace the window depth) if the window is called as a dialog box (am using save on mdi menu for all windows). Is there anyway of telling if a window has been called as a dialog, or do I have to pass a param and test. Barry ---- === At 24 MAY 1999 05:58AM cpates@sprezzatura.com,[url=http://www.sprezzatura.com]Sprezzatura Group[/url] wrote: === Hi Barry, You look at the form's PARENT property and if so check if the parent is enabled. I suppose you could also look to see if the dialog_box function is on the call stack too. Regards cpates@sprezzatura.com [url=http://www.sprezzatura.com" ]Sprezzatura Group[/url] [i]World Leaders in all things RevSoft[/i] [img]http://www.sprezzatura.com/zz.gif[/img] ---- === At 24 MAY 1999 07:59AM Barry Stevens wrote: === Ok, thanks I now have the Save button being created on the form (expands screen hight - makes button width of screen - looks good. BUT I cheated in creating the button, I made a button with a quick event of write on click event on a dummy screen, got the structure from start_widow and pasted it into my promoted create event.(I change the Window references.). What I dont have is the 'Write quickevent' happening - What do I now have to do to get that to work. Thanks Barry ---- === At 24 MAY 1999 09:11AM Don Bakke wrote: === Barry, Essentially you are creating a virtual button by storing the structure within event code and creating on the fly. If all you did was create a CLICK QuickEvent that sends a WRITE to @WINDOW then it should work. Are you sure you are passing the correct window name when you are creating this button? dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] ---- === At 25 MAY 1999 08:11AM Barry Stevens wrote: === Don, always to my rescue. Ok, in my promoted create event code I have: size=get_property(CtrlEntId,"SIZE") X=Size Y=Size Wide=Size High=Size PushButtonControl=CtrlEntId:".SAVE_BUTTON PUSHBUTTON ":CtrlEntId:" 0 0 198 24 Save 1 1 0X50000000 0X0 ":CtrlEntId:".ID 0 MS Sans Serif -11 700 0 0 0 0 34 0 1 2 1 0 0 CLICK*2*SYSPROG*CLICK..OIWIN* GOTFOCUS*3*BENTLOR*GOTFOCUS..OIWIN* LOSTFOCUS*4*BENTLOR*LOSTFOCUS..OIWIN* 1 " PushButtonControl= High-24 PushButtonControl= 0;*Wide - PushButtonControl-8 PushButtonControl= Wide-8 PushButtonControl=' Status=utility("CREATE",PushButtonControl) Size=Size+26 call set_property(CtrlEntId,"SIZE",Size) So, how does it know to do a write. This is how I got the structure: Struct=start_window("TEST_ADDSAVEBUTTON",@Window,'',1) open "SYSLISTS" to hFile then write Struct to hfile,"STRUCT" else null end Edited the file and cut the line that had the control. Barry PS: BENTLOR is the appid ---- === At 25 MAY 1999 11:38AM Oystein Reigem wrote: === Barry, Why don't you just have an invisible button on your form and make it visible when you need it? Or did I miss something? - Oystein - ---- === At 25 MAY 1999 12:18PM Don Bakke wrote: === Barry, Okay, the problem is that the actual QuickEvent assigned to this button is not stored in the button's structure. It is stored in the Window's structure but on a separate line and the two are cross-referenced when needed. Therefore you cannot create a virtual control with a QuickEvent intact. However, you can QUALIFY_EVENT the CLICK event of this button and direct it to any procedural event you would like. So you might want to create a promoted event just for this button with a one line code to write the current record of the current window. dbakke@srpcs.com [url=http://www.srpcs.com]SRP Computer Solutions[/url] [img]http://www.srpcs.com/srpicon1.gif[/img] ---- === At 25 MAY 1999 05:25PM Barry Stevens wrote: === It was an exercise in creating controls, and because I wanted the button at the bottom of the window - hidden from site in the extended part of the window - I had to keep checking that I had created it. If what I am doing is impossible - I will revert to creating them in the window. Barry ---- === At 25 MAY 1999 05:33PM Barry Stevens wrote: === Ah, I did try something like that after I sent the first message...which usually happens, makes you start thinking about it. The QUALIFY_EVENT was SYSPROG*WRITE*..OIWIN* but that didnt work, so I will try your method. Ooops no I cant, I have Pre/Post write processing in some windows. I will try a send_event write. Barry ---- === At 25 MAY 1999 06:47PM Barry Stevens wrote: === OK, dumbo has done it again...cant get it to work...Don, do you care to point out the obvious. FYI: This is in my create event call send_message(CtrlEntId:".SAVE_BUTTON","QUALIFY_EVENT",1:@fm:"0*BENTLOR*MYSAVEBUTTON*") Here is my ssp for promoted event .............. function promoted_mysavebutton(Void) declare function promoted_mysavebutton_proc *run copy_row "SYSOBJ", "$PROMOTED_MYSAVEBUTTON*BENTLOR", "SYSREPOSEVENTEXES", "BENTLOR*MYSAVEBUTTON*" RETURN promoted_mysavebutton_proc(Void) .......................................... function promoted_mysavebutton_proc(Void) call send_event(@Window,"WRITE") return 1 .................................... [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=NONWORKS_READ&SUMMARY=1&KEY=03A3B11B649DEC4D8525677900067019|View this thread on the forum...]]