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:
Making a Memo box Dialog

Subject: Making a Memo box Dialog

From: Muhammad

Date: 4 Apr, 2010 03:17:08

Message: 1 of 14

Dear All member

Could I make the static text to be fulfill text as a memo text box dialog.
How Could I do this?

Thanks

Subject: Making a Memo box Dialog

From: ImageAnalyst

Date: 4 Apr, 2010 03:22:15

Message: 2 of 14

Do you want to just use msgbox()?

Subject: Making a Memo box Dialog

From: Sadik

Date: 4 Apr, 2010 03:30:25

Message: 3 of 14

Or inputdlg, or input?

Best.

Subject: Making a Memo box Dialog

From: Muhammad

Date: 4 Apr, 2010 03:32:05

Message: 4 of 14


I mean how to create a memo box?
Static text in GUI which can be writable..
If I use edit text, I am facing a problem that I can write freely.

Thanks .

Subject: Making a Memo box Dialog

From: ImageAnalyst

Date: 4 Apr, 2010 03:34:46

Message: 5 of 14

This is confusing. Do you want the user to be able to type the text
or not????
If so, use inputdlg().
If not, use msgbox().

Subject: Making a Memo box Dialog

From: Matt Fig

Date: 4 Apr, 2010 03:37:07

Message: 6 of 14

"Muhammad " <fahrudin_fistek@yahoo.com> wrote in message <hp917l$q58$1@fred.mathworks.com>...
>
> I mean how to create a memo box?
> Static text in GUI which can be writable..
> If I use edit text, I am facing a problem that I can write freely.
>
> Thanks .


What, _exactly_ is the problem with using an editbox?

Subject: Making a Memo box Dialog

From: Muhammad

Date: 4 Apr, 2010 03:49:06

Message: 7 of 14

I want to make the static text can be write with the user from outside.
User can make a text in Paragraph.
I mean in many lines.

Subject: Making a Memo box Dialog

From: Matt Fig

Date: 4 Apr, 2010 04:02:22

Message: 8 of 14

If you simply want a multi-line textbox then use an edit text with the min property set to 0 and the max property set to 10. That will allow for multiple lines of text.

Subject: Making a Memo box Dialog

From: Muhammad

Date: 4 Apr, 2010 04:05:22

Message: 9 of 14

I'd like to make a write
such
 uicontrol(...
      'Parent',hpanel(5),...
      'Units','normalized',...
      'Position',[.1,.1,.8,.8],...
      'BackgroundColor','w',...
      'HorizontalAlignment','left',...
      'FontSize',12,...
      'Style','text',...
      'String',[ ...
      'UITABPANEL creates a group of tabbed '
      'panels with a consistent look and feel to'
      'the builtin MATLAB UI objects. '
      ' '
      'A special type of UITABPANEL is the '
      'popup tabpanel as shown on the left-hand '
      'side of this figure. ']);
I want to make the letter above can be changed from outside.
Thanks.

Subject: Making a Memo box Dialog

From: Sadik

Date: 4 Apr, 2010 04:08:06

Message: 10 of 14

I think I have got the problem. The aim is to have text wrapping. Although I do not know the exact answer.

Muhammad, if that is not true, could you upload an image of what you want and send the link? You could even prepare the image in microsoft paint.

Best.

Subject: Making a Memo box Dialog

From: Matt Fig

Date: 4 Apr, 2010 04:16:03

Message: 11 of 14

As I said, set the min and max properties of the edtibox so that max=10 and min=1.

Subject: Making a Memo box Dialog

From: Sadik

Date: 4 Apr, 2010 04:25:04

Message: 12 of 14

OK guys, here is the solution:

h = uicontrol(... % ************ YOU SHOULD SAY h = uicontrol(... SEE BELOW
...
'Units','normalized',...
'Position',[.1,.1,.8,.8],...
'BackgroundColor','w',...
'HorizontalAlignment','left',...
'FontSize',12,...
'Style','text',...
'String',[ 'UITABPANEL creates a group of tabbed ']);

This gives you the handle h that will enable you to change the text displayed in the static text.

Now you can do:

set(h,'String',{'The quick brown fox';'jumps over the lazy dog';'just another line'});

The key point is that you should use curly braces { } rather than [ ] so that your lines will not need to be of the same length.

Please copy and paste the above lines to see if this is what you are looking for?

Best.

Subject: Making a Memo box Dialog

From: Muhammad

Date: 4 Apr, 2010 04:33:03

Message: 13 of 14

"Sadik " <sadik.hava@gmail.com> wrote in message <hp93b6$n43$1@fred.mathworks.com>...
> I think I have got the problem. The aim is to have text wrapping. Although I do not know the exact answer.
>
> Muhammad, if that is not true, could you upload an image of what you want and send the link? You could even prepare the image in microsoft paint.
>
> Best.

Exactly, I need a box that can adjust the text. The example is in the notepad that has the wrapping text mode.
 

Subject: Making a Memo box Dialog

From: Muhammad

Date: 4 Apr, 2010 04:54:03

Message: 14 of 14

Many thanks, I got it.

Tags for 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