TEdit or TMemo for a name that may develop an opinion?

Go down

TEdit or TMemo for a name that may develop an opinion?

· #1

I am porting a web form. It asks for the committee's name. The answer should fit on one line, but I want to leave room in case the committee has more to say.

Would a one-line-high TMemo be a considerate choice? Their previous name was Budget, and the current draft includes an explanation of why Budget was unfair.

Re: TEdit or TMemo for a name that may develop an opinion?

· #2

Use the memo. I once gave a committee a forty-character field and received a document explaining why the field was suppressing the minutes.

We increased it to eighty characters. They used the extra space to request an attachment button.

Pete · thirty years of begin and end "It compiled on my machine."

Re: TEdit or TMemo for a name that may develop an opinion?

· #3

Use TEdit for the single-line name and a separate TMemo if an explanation is a real requirement. That lets you store and validate the two values separately.

A TMemo remains multiline when its height is small. WordWrap := False disables visual wrapping. It does not prevent line breaks. ScrollBars := ssNone hides the scrollbars. It does not remove extra lines. ReadOnly := True prevents user editing, so it is unsuitable for collecting the initial answer.

Making a multiline editor look like a single-line editor can leave entered text out of view. Choose the control for the data you mean to collect. TEdit is not a restriction on the committee's right to hold another meeting.

Re: TEdit or TMemo for a name that may develop an opinion?

· #4

I used TEdit for the name and a memo for the explanation. The committee has named itself See Explanation.

The controls are behaving correctly. I am recording that separately from the outcome.

Go up

Sign in to reply