Re: MetaCard fields

Scott Raney (raney@metacard.com)
Fri, 5 Apr 1996 10:37:35 -0700 (MST)

> I would like to specify that a text field should wrap at its
> displayed width, but where the contents are a string containing
> no spaces or returns. Is this possible?

No.

> Do I need to add returns to the string to cause the wrapping?

You could either put returns in, or put spaces or tabs in and set the
dontWrap property of the field to false.

> If so, does this mean that the 'xth char of field is return'?

Right. Something like the following will do what you want:
put return after char x of field 1

> Can I set characters on
> which to wrap other than space and return, perhaps as a wrapping
> property?

Nope. If you want to wrap on other characters, you'll have to do it
yourself. Note that you can use the formattedWidth property of a
field to help you figure out whether the width of your text string is
greater than the width of the field.

> Also, if I drag out two fields and want them exactly the same size,
> I assume one just says something like 'set the size of field a to
> the size of field b'.

You have to set the "width" and "height" properties separately. The
easiest way to do this is just to select all the fields/buttons you
want to make the same size (by clicking and dragging over them, or
shift-clicking on them individually) and click on the "same width" and
"same height" buttons in the layout tools stack.

> I have "The Complete HYPERCARD 2.0 Handbook"
> by Goodman, but I didn't see answers to these questions at first glance.

HyperCard users typically rely on XCMDS for text-width calculations,
since there is no formattedWidth property in HyperCard (it also lacks
a layout tools stack and even the ability to select multiple controls
at the same time).
Scott

> Allen Morgan
> CIBA
> RTP, NC
>

-- 
***************************************************************
Scott Raney   raney@metacard.com   http://www.metacard.com
Tcl and ksh: syntactic gymnastics
MetaCard: it does what you think