Default Text Items

Whether they are visible or not, every Keynote slide incorporates, by default, two text containers: one for the slide title; and one for the slide body. The visibility of these text items is determined by the state of the Appearance checkboxes in the Slide Layout pane of the Format tab.  (⬇ see image below ) 

The dictionary entry for the slide class contains properties for determining visibility of these default text items, and well references to the objects, enabling the ability to set and format their text contents.

The Default Text Item Properties (Excerpt from Slide Class)

slide: [inh. iWork container; see also Compatibility Suite] : A slide in a presentation document.

properties

body showingboolean ) : Is the default body text item visible on the slide?

default body itemtext item r/o ) : The default text item container for the body text of the slide. Its visibility is determined by the value of the body showing property.

default title itemtext item r/o ) : The default text item container for the title text of the slide. Its visibility is determined by the value of the title showing property.

title showingboolean ) : Is the default title text item visible on the slide?

Master Slides and Default Text Items

The following illustrations show how default text items are used in standard master slide designs:

default-text-items-01

(⬆ see above )  Title & Subtitle • This slide master design incorporates a default text item for the title  1  and a default text item for the subtitle  2  . Their visibility is determined by the status of their corresponding checkboxes.

default-text-items-02

(⬆ see above )  Title – Center • This slide master design incorporates a default text item for the title  1  and no default text item for a subtitle or body. Note that the checkbox for controlling the default body text item is unselected  2  .

default-text-items-03

(⬆ see above )  Title, Bullets & Photo • This slide master design incorporates a default text item for the title  1  and a default text item for the bullet list  2  .

default-text-items-04

(⬆ see above )  Blank • This slide master design incorporates no default text items, as indicated by the corresponding checkboxes for title  1  and body  2  .

Setting the Values of the Default Text Items

A slide’s default text items are elements of the text item class, inheriting from iWork items of the iWork Suite. The object text property of the text item class represents the text contents of the text item. Change the value of this property, and you change the contents of the text item. Unless specified otherwise, the formatting of a default text item assumes the styling of its related master slide.

NOTE: see the text item topic for details on applying styling to object text.

Text Item Properties (Excerpt from Text Item Class)

text item: [inh. iWork item : A text container.

properties

object textrich text ) : The text contained within the text item.

The following script demonstrates how to set the content of the default text items of created slides:

default-text-example

TOP | CONTINUE