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.

centered

set [the] centered to trueOrFalse

The centered property returns or sets whether HyperCard draws shapes from the center rather than from a corner. It corresponds to the Centered command in the Options menu (which appears when you select a Paint tool).

The centered property affects the Line, Rectangle, Rounded Rectangle, and Oval tools. Its default value is false.


Examples

set the centered to true

Demo Script

on mouseUp
   show bkgnd field "demo field"
   setUpPaint  -- See Below
   displayMessage "Drag with centered set to TRUE:"
   set the centered to true
   drag from 240,160 to 305,225 with optionKey
   wait 2 seconds
   displayMessage "The same drag with centered set to FALSE:"
   set the centered to false
   drag from 240,160 to 305,225
   wait 2 seconds
   doMenu "Revert"
   put empty into bkgnd field "demo field"
   hide bkgnd field "demo field"
   choose browse tool
 end mouseUp
 

 on setUpPaint
   choose rect tool
   set pattern to 22
   set the linesize to 2
   set filled to false
   set the dragSpeed to 100
   set multiSpace to 4
   set multiple to true
 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

« cantPeek | HyperTalk Reference | checkMark »


Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Modern View

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.

centered

set [the] centered to trueOrFalse

The centered property returns or sets whether HyperCard draws shapes from the center rather than from a corner. It corresponds to the Centered command in the Options menu (which appears when you select a Paint tool).

The centered property affects the Line, Rectangle, Rounded Rectangle, and Oval tools. Its default value is false.


Examples

set the centered to true

Demo Script

on mouseUp
   show bkgnd field "demo field"
   setUpPaint  -- See Below
   displayMessage "Drag with centered set to TRUE:"
   set the centered to true
   drag from 240,160 to 305,225 with optionKey
   wait 2 seconds
   displayMessage "The same drag with centered set to FALSE:"
   set the centered to false
   drag from 240,160 to 305,225
   wait 2 seconds
   doMenu "Revert"
   put empty into bkgnd field "demo field"
   hide bkgnd field "demo field"
   choose browse tool
 end mouseUp
 

 on setUpPaint
   choose rect tool
   set pattern to 22
   set the linesize to 2
   set filled to false
   set the dragSpeed to 100
   set multiSpace to 4
   set multiple to true
 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

« cantPeek | HyperTalk Reference | checkMark »

Version 0.7b1 (March 24, 2022)

Made with Macintosh

Switch to Retro View