Home
The HyperCard Center
HyperTalk Reference
Home » HyperTalk Reference » Properties

Note: This is a work in progress and will be formatting errors. Read more about the project on the home page.

grid

set [the] grid to trueOrFalse

The grid property returns or sets whether HyperCard constrains the movement of many Paint tools to eight-pixel intervals. It corresponds to the Grid command in the Options menu (which appears when you select a Paint tool).

The default value is false.


Examples

set the grid to true

Demo Script

on gridDemo
   setUpPaint
   show bkgnd field "demo field"
   displayMessage "Click the mouse to continue..." & return &¬
   "Grid set to false" & spaces(30) & "Grid set to true"
   set grid to false
   set dragspeed to 200
   drag from "20,110" to "165,250"
   wait 2 seconds
   set grid to true
   drag from "265,110" to "410,250"
   set the cursor to arrow
   wait until the mouseClick
   domenu "revert"
   hide bkgnd field "demo field"
   choose browse tool
 end gridDemo
 

 on setUpPaint
   choose rectangle tool
   set lineSize to 1
   set multiple to true
   set polysides to 4
   show card picture
   set centered to false
   set filled to false
 end setUpPaint

Placeholders

trueOrFalse
Any expression that evaluates to the HyperTalk and AppleScript constants true or false.

For example:

true
false
the hilite of bg btn "Yes"
fld "Zip" contains "95014"
the short name of this stack is "Fred"


Related Topics

« freeSize | HyperTalk Reference | height »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View