Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
GUI comments box

Subject: GUI comments box

From: Chris McCorquodale

Date: 6 Dec, 2012 16:02:08

Message: 1 of 4

Hi,

I am writing a gui that requires a 'comments' box for users to allow them to make comments/notes etc before saving or printing.

Initially I thought this would be easy - a big edit box. But that doesn't work as it only allows writing on one line. Also when you run out of room, it doesn't move on to the next line, just goes off the end.

Can't really think of any other simple ways of doing this. Anyone have any ideas?

Thanks in advance.

Subject: GUI comments box

From: Justin Ashmall

Date: 6 Dec, 2012 17:07:08

Message: 2 of 4

"Chris McCorquodale" wrote in message <k9qfi0$gcj$1@newscl01ah.mathworks.com>...
> I am writing a gui that requires a 'comments' box for users to allow them to make comments/notes etc before saving or printing.
>
> Initially I thought this would be easy - a big edit box. But that doesn't work as it only allows writing on one line. Also when you run out of room, it doesn't move on to the next line, just goes off the end.

Try using inputdlg(), specifying the number of lines as the 3rd argument. E.g. to show an input dialog with 10 lines:

res = inputdlg('Enter Comment','Comment',10)

Justin

Subject: GUI comments box

From: Doug Schwarz

Date: 6 Dec, 2012 17:26:38

Message: 3 of 4

In article <k9qfi0$gcj$1@newscl01ah.mathworks.com>,
 "Chris McCorquodale" <remove.this.c.mccorquodale@axon-cable.co.uk>
 wrote:

> Hi,
>
> I am writing a gui that requires a 'comments' box for users to allow them to
> make comments/notes etc before saving or printing.
>
> Initially I thought this would be easy - a big edit box. But that doesn't
> work as it only allows writing on one line. Also when you run out of room, it
> doesn't move on to the next line, just goes off the end.
>
> Can't really think of any other simple ways of doing this. Anyone have any
> ideas?
>
> Thanks in advance.

Set the 'Max' property of the edit box to something greater than 1.

--
Doug Schwarz
dmschwarz&ieee,org
Make obvious changes to get real email address.

Subject: GUI comments box

From: Chris McCorquodale

Date: 7 Dec, 2012 08:16:07

Message: 4 of 4

Got it working fine using the 'Max' property box - easy when you know how!

Thanks for the responses

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us