Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Finder Guide /
Chapter 2 - Finder Objects / Object Class Definitions


Control Panel

An object of class Control Panel is a control panel file on a disk.

PROPERTIES
A control panel has all the properties defined for object class File on page 60: Creator Type, File Type, Locked, Product Version, Stationery, and Version.

Like any other file, a control panel also has all the properties defined for object class Item on page 72: Bounds, Comment, Container, Content Space, Creation Date, Disk, Folder, Icon, ID, Information Window, Kind, Label Index, Modification Date, Name, Physical Size, Position, Selected, Size, and Window.

Unlike other kinds of files and unlike other control panels, the Views control panel may also have these properties:

calculate folder sizes
A Boolean value that indicates whether the checkbox labeled "Calculate folder sizes" in the Views control panel is selected (true) or not (false).
Class: Boolean
Modifiable: Yes
comment heading
A Boolean value that indicates whether the checkbox labeled "Show comments" in the Views control panel is selected (true) or not (false).
Class: Boolean
Modifiable: Yes
date heading
A Boolean value that indicates whether the checkbox labeled "Show date" in the Views control panel is selected (true) or
not (false).
Class: Boolean
Modifiable: Yes
disk information heading
A Boolean value that indicates whether the checkbox labeled "Show disk info in header" in the Views control panel is selected (true) or not (false).
Class: Boolean
Modifiable: Yes
icon size
An integer indicating the icon size selected under List Views in the Views control panel: 0 for the largest size, 1 for the medium size, and 2 for the smallest size.
Class: Integer
Modifiable: Yes
kind heading
A Boolean value that indicates whether the checkbox labeled "Show kind" in the Views control panel is selected (true) or
not (false).
Class: Boolean
Modifiable: Yes
label heading
A Boolean value that indicates whether the checkbox labeled "Show label" in the Views control panel is selected (true) or not (false).
Class: Boolean
Modifiable: Yes
size heading
A Boolean value that indicates whether the checkbox labeled "Show size" in the Views control panel is selected (true) or
not (false).
Class: Boolean
Modifiable: Yes
snap to grid
A Boolean value that indicates whether the checkbox labeled "Always snap to grid" in the Views control panel is selected (true) or not (false).
Class: Boolean
Modifiable: Yes
staggered grid
A Boolean value that indicates whether the checkbox labeled "Staggered grid" in the Views control panel is selected (true) or not (false).
Class: Boolean
Modifiable: Yes
version heading
A Boolean value that indicates whether the checkbox labeled "Show version" in the Views control panel is selected (true)
or not (false).
Class: Boolean
Modifiable: Yes
view font
The ID of the font selected in the Views control panel.
Class: Integer
Modifiable: Yes
view font size
The size of the font selected in the Views control panel.
Class: Integer
Modifiable: Yes
ELEMENT CLASSES
None

COMMANDS HANDLED
Clean Up, Close, Copy, Count, Data Size, Delete, Duplicate, Exists, Get, Move, Open, Put Away, Reveal, Select, Sort, Update

DEFAULT VALUE CLASS RETURNED
Reference to a file or, if you use the plural form control panels, a list of references.

EXAMPLES
This script turns on the Snap to Grid property of the Views control panel:

tell application "Finder"
   set snap to grid of control panel "Views" of �
      control panels folder to true
end tell
You can also use the View Preferences property of the Finder application object as a reference to the Views control panel. For example, this script toggles the Date Heading property of the Views control panel on and off:

tell application "Finder"
   set date heading of view preferences to �
      not date heading of view preferences
end tell

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996