home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1999 January
/
pcwk_01_1999_B.iso
/
Lotus123
/
SPANISH
/
LOTUS006.DSK
/
SCRIPTS
/
MAKECALC.TPL
< prev
Wrap
Text File
|
1996-09-18
|
1KB
|
40 lines
'Create calculated field
'Field1 and Field2 are valid fields in the table attached to this apr
'If there are joins, you must specify the table name, as in
' tablename.fieldname
rval = CurrentDocument.createcalcfield("AddIt", "Field1 + Field2")
'Create a new fieldbox to place on the body panel of the current view
Set myField= New Fieldbox(CurrentView.body)
'Set the dimensions of the fieldbox. Values are in twips
myfield.left = 800
myField.top = 2000
myfield.width = 1500
myfield.height =500
'Don't enclose the field label text
myfield.border.encloselabel = 0
'Set the border properties
myfield.border.pattern = $LTSBORDERPATTERNDOUBLE
myfield.border.color.setrgb color_black
myfield.border.width = $APR6POINT
'Make the field visible
myfield.visible = True
'Set the text for the label and its properties
myField.labeltext = "AddIt"
myfield.labelposition=$ltspositiontop
myField.labelalignment = $ltsAlignmentLEFT
'Add shadow color to the fieldbox
myfield.shadowcolor.setrgb color_30_gray
'Attach the calculated field that was created to the field box
myfield.datafield = "Addit"
'Set the fill color for the field box
myfield.background.color.setrgb color_White