How can a MATLAB GUIDE control be used to display the contents of a text file in a GUI? The text file may be very long or very wide so it should have the ability to have vertical and horizontal scroll bars.
相关问题
- Extract matrix elements using a vector of column i
- JFX scale image up and down to parent
- How do you get R's null and residual deviance
- How to display an image represented by three matri
- OpenCV - Is there an implementation of marker base
相关文章
- How do I append metadata to an image in Matlab?
- Algorithm for maximizing coverage of rectangular a
- Is there a way to hide the new HTML5 spinbox contr
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- PropertyGrid - Possible to have a file/directory s
- Programming a touch screen application with SWING
- Can WM_NEXTDLGCTL be used with non-dialog windows?
- How can I write-protect the Matlab language?
Here is my solution for a generic text file called "textfile.txt":
A multi-line editbox may be the best choice to display the text. Example:
To enable horizontal scrolling, we must get a handle to the embedded JScrollPane java component. I am using the excellent FINDJOBJ function. Then we set the
HorizontalScrollBarPolicy
property tojavax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED
(= 30) as explained in this post. I also disabled editing of the text (read only).Here is my solution. Good Luck