3.2 Specifying titles
:titlekeyword. This is much easier than using title-panes, since it does not necessitate using a layout to group two elements together.
Any class that is a subclass of
titled-pane supports the
:title keyword. All of the standard CAPI panes inherit from this class. You can find out all the subclasses of
titled-pane by graphing them using the class browser.
The position of any title can be specified by using the
:title-position keyword. Most panes default the title-position to
:top, although some use
The title of a CAPI element may be changed interactively with the use of
setf, if you wish.
(setq button (make-instance 'push-button :text "Hello" :title "Press: " :title-position :left :callback 'hello))
(setf (titled-pane-title button) "Press here: ")As soon as the form is evaluated, the title of the pane you just created changes. Notice how the window automatically resizes to make allowance for the size of the new title.
Generated with Harlequin WebMaker