Copying from GUI listbox to Matlab Desktop
2 次查看(过去 30 天)
显示 更早的评论
Hi,
is there a way to copy (selected) elements listed in a listbox GUI to the buffer (Ctrl-C,etc) and from there to the editor, desktop, or even to sytem?
I was not able to figure out which option of the object would enable this behavior, and I guess there should be possible (as other elements in GUI can get cut and pasted...)
thansk in advance, Daniel
0 个评论
采纳的回答
Fangjun Jiang
2011-11-8
Are you asking about doing it in code or doing it interactively when you edit the GUI elements?
You can use clipboard() to implement the copy-and-paste functionality in the code. If doing it interactively, you need to edit the property of the listbox and the Ctrl+c and Ctrl+v.
0 个评论
更多回答(2 个)
Walter Roberson
2011-11-8
There is no MATLAB option to enable or disable this. Whether it would work or not would operating system dependent.
You can have the callback for the listbox detect the current Value, and extract the String rows corresponding to the selected elements, and then do something with them. This would require "activating" the listbox, though.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Migrate GUIDE Apps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!