How do I obtain the starting and ending character position in a text box that a user is highlighting?
조회 수: 2 (최근 30일)
이전 댓글 표시
I have a large edit box in gui that I used to display the contents of a text file to the user. The user can then highlight a number in the text and press a gui button to "record the text". If the text box tag was "eb_filetext", in versions up to matlab 2014 I used the following 3 commands to achieve this task:
begins = handles.eb_filetext_java.getSelectionStart()
ends = handles.eb_filetext_java.getSelectionEnd()
selection = char(handles.eb_filetext_java.getSelectedText())
Versions 2016 and up, this function is broken. These few lines of code are critical to the operation of a 15,000 line GUI that was developed. How can I replace/update this code! Help!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Files and Folders에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!