The position of any title can be specified by using the
:title-position
keyword. Most panes default their
title-position
to
:top
, although some use
:left
.
You can place the title in a frame (like a groupbox) around its element by specifying
:title-position :frame
.
You may specify the font used in the title via the keyword
:title-font.
The title of a
titled-object
, and its font, 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))
(contain button)
(apply-in-pane-process
button #'(setf titled-object-title) "Press here: " button)
As soon as the form is evaluated, the title of the pane you just created changes.
(apply-in-pane-process
button #'(setf titled-object-title-font)
(gp:merge-font-descriptions
(gp:make-font-description :size 42)
(gp:convert-to-font-description
button
(titled-object-title-font button))) button)
Notice how the window automatically resizes in steps 2 and 3, to make allowance for the new size of the title.
CAPI User Guide (Windows version) - 30 Aug 2011