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
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.
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.
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 .
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With