I wrote a thing, I wrote a thing!
https://turtleware.eu/posts/McCLIM-and-7GUIs---Part-1-The-Counter.html
This tutorial will be included in McCLIM manual (and other parts too).
I wrote a thing, I wrote a thing!
https://turtleware.eu/posts/McCLIM-and-7GUIs---Part-1-The-Counter.html
This tutorial will be included in McCLIM manual (and other parts too).
@jackdaniel In the layout of the second example of version 1 why do you insert a label pane between the text field and the button? Wouldn't +fill+ or similar do?
@amoroso it is a kludge and a mistake.
Originally I have wanted to put there a spacing pane:
(horizontally ()
(100
(bordering (:thickness 1 :background +black+)
(spacing (:thickness 4 :background +white+) tfield)))
(spacing (:thickness 15))
(100 button))
but spacing pane implementation expects to have a child (signals an error). This is under-specified whether spacing pane can have 0 children, but I find it to be the most appropriate pane for specifying additional space (with more initargs that would allow specifying left, right, top and bottom margins separately when deemed necessary).
As a substitute I've picked an empty label pane that works with and without children (there are small issues with positioning, so it could use some work).
All that said, I could have just put there 15, and that would have worked equally well, because the macro horizontally accepts numbers (and a symbol +fill+) as contents forms. So it should be simply:
(horizontally ()
(100
(bordering (:thickness 1 :background +black+)
(spacing (:thickness 4 :background +white+) tfield)))
15
(100 button))
I didn't want to put there +fill+, because:
- then it would be possible to resize the pane
- there wouldn't be initial space between gadgets
and it looks rather good with the space of exact size 15 (given both have 100).
Thanks for bringing this up, I'll update the post to put them just 15.