dumb question about gadgets
Daniel Kochmański
daniel at turtleware.eu
Sat Nov 11 20:24:04 UTC 2017
Hello John,
question is obviously not dumb. Some cognitive problem arises from the
disparity, that McCLIM provides both sheets and gadgets. If you want to
lay out buttons vertically, you may either put terpri after each
make-pane, or put each button in your layout (the latter is more elegant
imho):
-- cut --
(in-package :clim-user)
(defun make-gadget (item)
(make-pane 'push-button
:label item
:activate-callback
(lambda (&rest args)
(declare (ignore args))
(notify-user *application-frame* "You clicked a button"))))
(define-application-frame test-gadgets ()
()
(:panes)
(:layouts
(default (vertically ()
(make-gadget "one")
(make-gadget "two")
(make-gadget "three")
(make-gadget "four")))))
(run-frame-top-level (make-application-frame 'test-gadgets))
-- cut --
Best regards,
Daniel
On 11.11.2017 21:07, John Morrison wrote:
> Hi;
>
> In another app I am writing, I BELIEVE gadgets used to come out
> stacked vertically. After an upgrade (to current git), I think they
> come out "diagonally," in that the x & y of successive gadgets
> increase (presumbly by the dimensions of its preceding gadget).
> Please find attached the simplest test program I could cons up that
> displays the behavior, along with a screenshot that shows the behavior.
>
> What is the idiomatic/best way to get them to stack vertically? I
> messed about (again, mostly unsuccessfully, or I wouldn't be pestering
> you all) with various approaches, but every time I find myself with a
> complex solution, it turns out there is indeed a Better, Simpler Way.
>
> Thanks,
>
> -jm
>
More information about the mcclim-devel
mailing list