home *** CD-ROM | disk | FTP | other *** search
- /*
-
- calclear.cwx
-
- This script clears the calendar template (see calendar.cwx)
-
- Copyright 1997 by TrueSpectra Inc.
-
- This code is provided purely for demonstration purposes and is not
- supported or under warranty. Feel free to modify and examine this
- example script for your own purposes.
-
- */
-
-
-
- /* Load utility functions. */
- call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
- call SysLoadFuncs
-
-
-
- if RxMessageBox("Are you sure you want to clear the current calendar?","Settings","yesno") ,
- \= 6 then
- exit
-
- h = 0
- do day = 1 to 7
- do week = 1 to 6
- name = n||week||day
- call settext name, ''
- end
- end
-
- call settext month, ''
- call settext year, ''
-
- exit
-
-
-
-
- /* set the text of a text object. */
- settext: procedure
- arg object, text
-
- dh = CwGetHandleFromObjectName(CwGetCurrentView(), object)
-
- if CwIsHandleValid(dh) then do
- dah = CwGetRegion( dh )
- call CwSetProperty dah, 'caption', text
- end
-
- return
-
-
-
-