Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I create a matlab multi-line edit box in Guide?

I am fairly new to Matlab and I am using GUIDE to create a GUI. I am looking to make a GUI that I can enter an item name and description and other stuff and then upon submit, they will be submitted into database.

My question is how to make a Description box , like where I put the item description. I did try the edit box but it is a single line object.

Thank you

like image 648
Momo Avatar asked Nov 07 '11 12:11

Momo


People also ask

How do I edit a guide in Matlab?

Type guide in command window. A new GUI dialog box will appear. In the dialog box you will select the existing GUI project. To to the tab and you will find the gui file which you want to edit.

How do you write multiple lines in Matlab?

To enter multiple lines before running any of them, use Shift+Enter or Shift+Return after typing a line. This is useful, for example, when entering a set of statements containing keywords, such as if ... end. The cursor moves down to the next line, which does not show a prompt, where you can type the next line.

How do you split a string into multiple lines in Matlab?

newStr = splitlines( str ) splits str at newline characters and returns the result as the output array newStr . splitlines splits at actual newline characters, not at the literal \n . To split a string that contains \n , first use compose and then use splitlines .

How do you skip to the next line in Matlab?

Answers (1) If you wish to skip some particular lines of code, you can use "continue" function in MATLAB, or, if you wish to go to a particular line in a code after executing a loop, you can use "if" condition.


1 Answers

Take a look at the documentation for the properties of uicontrols. You can set the Max and Min properties of an edit box. I know it seems crazy, but if Max - Min > 1, the edit box will accept multiline input; if Max - Min <= 1, it is single line only. Otherwise, the Max and Min properties have no effect on edit box controls.

Another option would be to have separate input methods for the name, description and other stuff that you want your users to enter via the GUI. Depending on your application, that might make for a cleaner GUI design.

like image 84
Sam Roberts Avatar answered Sep 29 '22 23:09

Sam Roberts