Tabbed Interface (OpenInsight Specific)
At 27 MAY 1998 11:47:40AM Paul Marfia wrote:
A white paper dated November 1997 showed an improved "Tabbed User Interface Update" process involving several routines that I assumed went in the window as scripts for the CREATE and PAGE events. I used these routines in a window and they worked fine.
I want to design other windows with this type of interface, so I thought the logical thing to do was make these routines into procedures - TAB_CREATE and TAB_PAGE and call them instead of adding lines of the same code to all my windows.
The problem is, PAGE, for instance, is called from the script as a FUNCTION OIEVENT( ctrlentID, ctrlclassID, PageAction). How to I set up my TAB_PAGE routine to get the same three parameters parameters that the script in the window does?
Thanks again.
Paul
At 27 MAY 1998 02:07PM DSig (SigSolutions) wrote:
paul,
Unless I am missing something from your question .. the routine below does what you want. BUT what I would do is put the create and page sections together in 1 routine and then pass create or page so the routine knows which branch to follow. RTI should have done this but ..
Subroutine Tab_Page(CtrlEntId, CtrlClassId, PageAction)
declare subroutine Forward_Event, Set_Property
declare function get_property
equ TRUE$ to 1
equ FALSE$ to 0
* tab controls must start with "PAGE_" and end with "_TAB" with a number in
* between representing the page number associated with the tab
equ TAB_PREFIX$ to "PAGE_"
equ TAB_SUFFIX$ to "_TAB"
* handle the page event
Forward_Event(PageAction)
* radio buttons do not auto-check on gotfocus so explicitly set the check
Set_Property(@window: ".": TAB_PREFIX$ : Get_Property(@window, "VPOSITION") : TAB_SUFFIX$, "CHECK", TRUE$)
Return
At 27 MAY 1998 04:19PM Paul Marfia wrote:
DSig,
Thanks for the response. The routine itself, whether it be one or two different procedures, runs fine. It's just that I don't think I'm setting enough stuff in the "QuiEvent for PAGE" window. As follows:
Event:=PAGE
Send Message to:=Entity "SAMS*STPROCEXE**TAB_PAGE"
Message:=EXECUTE"
Parameters:="
Return value in:="
For the PAGE_TAB portion of the code, the "PageAction" in Forward_Event has no value. Neither does ctrlentID nor cntrlclassID. I need to know how to call my TAB_PAGE routine and get those 3 parameters set.
Thanks
Paul
At 28 MAY 1998 05:07PM Cameron Revelation wrote:
Paul,
In the example given you don't need any parameters. The reason you don't have to forward the event is that the quick event is at the end of the chain (it has already been forwarded).
<code> Subroutine Tab_Page(void) declare subroutine Set_Property declare function Get_Property equ TRUE$ to 1 equ FALSE$ to 0 * tab controls must start with "PAGE_" and end with "_TAB" with a number in * between representing the page number associated with the tab equ TAB_PREFIX$ to "PAGE_" equ TAB_SUFFIX$ to "_TAB" * radio buttons do not auto-check on gotfocus so explicitly set the check Set_Property(@window: ".": TAB_PREFIX$ : Get_Property(@window, "VPOSITION") : TAB_SUFFIX$, "CHECK", TRUE$) Return</code>
If you do want to pass parameters, the CtrlEntID parameter is passed as @self:
<code> Parameters:=@self'"</code>
If you wanted to pass the CtrlEntID and the PageAction parameter (which is the first event parameter not counting the standard CtrlEntID/CtrlClassID), you would pass:
<code> Parameters:=@self', '@param1'"</code>
Hope that helps.
Cameron Purdy
At 01 JUN 1998 11:21AM Paul Marfia wrote:
Thanks for your help.
Paul