Virtual pushbuttons (OpenInsight Specific)
At 06 JUL 1998 11:21:59AM Don Bakke wrote:
I have a subroutine that creates a virtual pushbutton on the form (cf. Pushbuttons on edittables post). The basic approach is to store the structure as a string and then create the control on the fly substituting essential information where necessary (e.g. the form name). This is working very well.
However, I wanted to know if one or two things were possible:
1. Create a virtual button that also launches a SSP, preferably a SSP whose name is only known at runtime.
2. Create a virtual button that can pass parameters other than its own CtrlEntId and CtrlClassId.
Currently, this virtual button calls the OMNIEVENT of the parent form and it is up to the designer to make sure an OMNIEVENT exists and that it checks for the specific CtrlEntId to see if this was called by the virtual button. It would be nicer if I could make this virtual button work a little smarter, that is, more like a pre-defined button.
Thanks in advance for any ideas,
dbakke@srpcs.com
At 06 JUL 1998 12:31PM Andrew P McAuley wrote:
Well it is possible - we create complete Windows on the fly in an SLIST to be….
Here's a sample segment - essentially you need to deal with all the Window Common as well. This is meant to be the subject of a TB but… ;-(
OKButton=SLIST_COLLECTOR.OK" ControlMap=SLIST_COLLECTOR.OK" ControlSemantics=CLICK" : @Svm ControlSemantics=R" : @Tm : "EXECUTE" : @Tm : "SYSPROG*STPROCEXE… ControlSemantics=0 OKButton= "PUSHBUTTON" OKButton= "SLIST_COLLECTOR" OKButton = Biggest + EditWidth$ + 45 OKButton = 10 OKButton= 80 OKButton = 25 OKButton = "O&k" OKButton= True$
amcauley@sprezzatura.com
World Leaders in all things RevSoft
At 06 JUL 1998 04:49PM Don Bakke wrote:
Hi Andrew,
I had pretty much figured out how to go about this if I were to create the window as well as the button on-the-fly. But let me go a little bit further and describe my ultimate goal. If you wouldn't mind, tell me if this is completely workable in this context:
We have a subroutine that is intended to be a black box solution for adding drop down buttons (or any button for that matter) to cells within an edittable. That is, as the focus changes from cell to cell, a small button will appear in the far right of the current cell and the previous cell will no longer have a button. Depending on the developer's preference, this can call a PopUp, a virtual listbox (to give a true drop down effect), or anything else they desire.
In addition to the specific project for which it was designed, we would eventually like to promote it as a developer's tool for easy "plug-n-play" use for any form and any edittable.
So far this works very well. However, as far as I can tell, the structure of a PUSHBMP can only reference the name of an event…but even so it can't pass any variable parameters into that event (other than what PS provides - CtrlEntId and CtrlClassId.) Therefore we have hardcoded this event to be the OMNIEVENT of the parent window. We would like this PUSHBMP to have the option of calling an event or a SSP (which would be provided by one of the parameters to this subroutine.) Furthermore, it should have the ability to pass parameters into either the SSP or the event. For the moment, we are setting a user defined property of the window as a workaround.
So, can either the structure of PUSHBMP allow for SSP references and/or parameters or are there additional things that can be done to enable these features yet still be able to keep this self-contained in a generic subroutine?
Thanks again for your help,
dbakke@srpcs.com