Re: Widening panes to the enclosing column layout's width
"MK (as mkuuskan at yahoo dot com)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
Didier,
Not knowing how you defined the layout in the first place but just in case:
(capi:contain
(make-instance
'capi:column-layout
:visible-max-width t
:description
(list
(make-instance
'capi:column-layout
:title "asdasdas"
:title-position :frame
:visible-max-width () ;;; <-------- GEOMETRIC HINT
:description
(loop repeat 3
collect
(make-instance 'capi:check-button
:text (subseq "Lorem ipsum dolor sit amet, consectetur adipiscing elit" 0 (1+ (random 50))))))
(make-instance
'capi:column-layout
:title "cuacaasdfsdf"
:title-position :frame
:visible-max-width () ;;; <-------- GEOMETRIC HINT
:description
(loop repeat 3
collect
(make-instance 'capi:check-button
:text (subseq "Lorem ipsum dolor sit amet, consectetur adipiscing elit" 0 (1+ (random 50)))))))))
-mika
> On 13. Dec 2025, at 20.40, David McClain (as dbm at refined-audiometrics dot com) <[email protected]> wrote:
>
> How about just specifying widths in terms of :characters for longest text?
>
>
>
>> On Dec 13, 2025, at 09:03, Didier Verna (as didier at didierverna dot net) <[email protected]> wrote:
>>
>>
>> Hi,
>>
>> I fear this is a FAQ, but...
>>
>> if you look at the attached small picture, you'll notice that the two
>> check boxes are not exactly of the same width. I would like them all to
>> have the width of the widest one, in the enclosing column layout.
>>
>> I've tried something like this in an interface-display : before method,
>> but it gives me weird sizes.
>>
>> (let ((width 0))
>> (map-pane-children layout
>> (lambda (pane)
>> (with-geometry pane
>> (when (> %min-width% width) (setq width %min-width%)))))
>> (map-pane-children layout
>> (lambda (pane)
>> (set-hint-table pane
>> `(:visible-min-width ,width :visible-max-width ,width)))))
>>
>> Thank you!
>>
>> <Screenshot 2025-12-13 at 16.54.50.png>
>> --
>> Resistance is futile. You will be jazzimilated.
>>
>> Lisp, Jazz, Aïkido: http://www.didierverna.info
>
>
> _______________________________________________
> Lisp Hug - the mailing list for LispWorks users
> [email protected]
> http://www.lispworks.com/support/lisp-hug.html
_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html