[mcclim-devel] text-field problem

Gilbert Baumann gilbert at base-engineering.com
Sat Dec 3 17:45:03 UTC 2005


Thomas Persson <thomas at spacecentre.se> writes:
> Hi
> 
> After a cvs update tonight I noticed that the text-field gadget gets
> initialized with a width of 0, if you don't supply a ":value", resulting
> in a grey box as seen here:
> 
>    http://www.spacecentre.se/thomas/text-field.png
> 

This is kind of fixed now, as the vrack and hrack pane again force
the minor dimensions of their children.

Anyhow note that the space requirements of the text field pane are
still bogus or at least not what you expect. The text field is stating
a max width of 0, So for instance this leads to non-intuitive behavior
too:

  (horizontally ()
    (make-pane 'text-field :value "")
    (make-pane 'push-button :label "Search"))

One might expect that the text-field is stretchable by default.

This can be however be circumvented by:

  (horizontally ()
    (+fill+ (make-pane 'text-field :value ""))
    (make-pane 'push-button :label "Search"))

But: In a different application you might expect the text field to not
be stretchable.

Unfortunatly the spec says nothing about the kind of space
requirements a certain gadget will return. We can only try to be
resonable. For instance you almost never want a button to the
strechable by default, contrast to scrolled pane, which you expect to
be strechable in most cases.

-- 
Gilbert Baumann



More information about the mcclim-devel mailing list