Re: CAPI display text with alignment

"John DeSoi (as john at desoi dot dev)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <01000194778c62ca-0a486509-0129-47fe-9521-92e35a7c0ce6-000000@email.amazonses.com>
My use case is to replicate forms from another system. There will be lots of these text labels with the position, size, font, and alignment fully specified. It seems like overkill to make each one a column layout to get non-left alignment, but I don't see any other option. And it does not work if the text is multi-line without splitting it and writing a some other code.

The second example below causes the container to be taller if you use :top. 

Thanks to everyone for the suggestions and examples.

John DeSoi, Ph.D.


> On Jan 17, 2025, at 1:31 AM, MK (as mkuuskan at yahoo dot com) <[email protected]> wrote:
> 
> If it's supposed to be just one line you can also use layouts:
> 
> (capi:contain (make-instance 'capi:column-layout :adjust :center :visible-max-width () :description (list (make-instance 'capi:title-pane :text "CENTERED TEXT"))))
> 
> want to make use of the title of the pane, do it like so:
> 
> (capi:contain (make-instance 'capi:title-pane :title "test" :visible-max-width ()  :title-font  (gp:make-font-description :size 24) :title-position :top  :title-adjust :center))
> 
> there are other ways depending on your use case.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.