` Printed Icetips Article

Icetips Article



Par2: View only form (using existing form) -- Code Template
1999-08-20 -- Kevin Jackson
 
I wrote a small code template to do this, you add it to the Open
Window (Priority) within the Thiswindow.Init method.

It will disable all controls except the one's you specify not to, also
it doesn't disable sheets or tabs.

It's as below :-

#CODE(DisableControlsExcept,'Disable All Controls Except')
#TAB('%Controls')
        #BUTTON('Controls...'),MULTI(%Cntrls2,%ControlEqu2)
            #PROMPT('Control :',CONTROL),%ControlEqu2,REQ
        #ENDBUTTON
#ENDTAB
        #FOR (%Control)
            #IF (%ControlType = 'TAB' OR %ControlType = 'SHEET' OR
%ControlType = 'PROMPT' OR %ControlType = 'STRING')
                #CYCLE
            #END
            DISABLE(%Control)
            #FOR (%Cntrls2)
                #IF (%Control = %ControlEqu2)
                    ENABLE(%Control)
                    #BREAK
                #ENDIF
            #ENDFOR
        #ENDFOR



Printed May 5, 2024, 12:15 pm
This article has been viewed/printed 35123 times.