17.11.2014 Views

ChemOffice.Com - CambridgeSoft

ChemOffice.Com - CambridgeSoft

ChemOffice.Com - CambridgeSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

• A simple name without extension, if the script<br />

is stored in the standard scripts subdirectory<br />

with the standard file extension. If the script<br />

name appears on the Scripts menu, you can use<br />

the name from the menu.<br />

The table below shows examples of Box Creation<br />

<strong>Com</strong>mands:<br />

<strong>Com</strong>mand<br />

FRAME 10 10 300<br />

60 Molecular<br />

Formula<br />

DBOX 20 20 290<br />

50 formula<br />

TEXT 100 100 300<br />

150 “A Label”<br />

PICT 500 300 600<br />

400 C:\LOGO.WMF<br />

BUTTON 500 10<br />

550 40 DEMO<br />

Action<br />

Box Manipulation<br />

<strong>Com</strong>mands<br />

FORMEDIT ON|OFF<br />

SELECT box<br />

UNSELECT box<br />

DELBOX box<br />

SETFIELD box fieldname<br />

SETTEXT box text<br />

ACTIVATE subform<br />

DEACTIVATE<br />

SCALE<br />

SCALE_TO_FIT<br />

create frame with label<br />

at upper left<br />

create data box for<br />

formula in above frame<br />

create a static text<br />

string<br />

put specified picture at<br />

lower right<br />

create button at upper<br />

right to run script<br />

DEMO.CFS<br />

To work with a box or subform on the form, you<br />

specify a keyword followed by a box identifier. A<br />

box is identified in one of two ways:<br />

• By point—Give the coordinates of a point<br />

anywhere within the box. When coordinates<br />

fall in more than one box, the most recently<br />

created box is used.<br />

• By text—The text you enter to identify a box<br />

may be:<br />

• The field name, if the box contains data<br />

from a database.<br />

• The text label, if the box contains static text,<br />

such as frames or text labels.<br />

• The box name assigned in Box Properties.<br />

• For subform boxes, the table name.<br />

In all cases, you need not spell out the entire<br />

name, just enough to be unique.<br />

Often, more than one box matches the text you<br />

enter, for example a box displaying field<br />

“molweight” within a frame labelled<br />

“MolWeight.” In this case, preference is given<br />

to the box connected to the database.<br />

FORMEDIT controls the behavior of the SELECT<br />

command. With FORMEDIT ON, SELECT affects<br />

boxes. With FORMEDIT OFF, SELECT affects the<br />

contents of those boxes.<br />

SELECT and UNSELECT choose boxes to be<br />

modified by editing operations. DELBOX is a<br />

shortcut for FORMEDIT ON, followed by SELECT,<br />

followed by Edit Clear. SETFIELD connects a<br />

database field to an existing box; for a button, it<br />

attaches a script name (see above regarding script<br />

names). SETTEXT attaches a text string to a box or<br />

replaces the one currently attached; see box<br />

creation commands (above) for a list of what the<br />

text strings mean for various box types.<br />

ACTIVATE and DEACTIVATE are the same as<br />

SELECT and UNSELECT, but work on subforms.<br />

Following an ACTIVATE command, all subsequent<br />

commands apply to the active subform and any<br />

Appendices<br />

<strong>ChemOffice</strong> 2005/Appendix CAL <strong>Com</strong>mands • 693<br />

Box Manipulation <strong>Com</strong>mands

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!