3.2 Specifying titles
:title
keyword. 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 oftitled-pane
supports the:title
keyword. All of the standard CAPI panes inherit from this class. You can find out all the subclasses oftitled-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:left
.
The title of a CAPI element may be changed interactively with the use ofsetf
, if you wish.
(setq button (make-instance 'push-button :text "Hello" :title "Press: " :title-position :left :callback 'hello))(contain button)
(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