How do I obtain the starting and ending character position in a text box that a user is highlighting?

1 vue (au cours des 30 derniers jours)
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!

Réponses (0)

Catégories

En savoir plus sur Migrate GUIDE Apps dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by