View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Copy Paste

Be the first to rate this file! 4 Downloads (last 30 days) File Size: 36.2 KB File ID: #27971 Version: 1.0
image thumbnail

Copy Paste



A simple Cut, Copy, Paste contextmenu for edit boxes in GUI.

| Watch this File

File Information

Copy Paste ver. 1.0

This is a very simple cut/copy/paste context menu using java handles. This code uses findjobj by Yair Altman ( to locate the java handles.



f1 = figure('Name','Copy-Paste','Position', [480 480 340 100],'NumberTitle','off');
h1 = uicontrol(f1, 'Style', 'edit',...
       'String', 'Cut',...
       'BackgroundColor', [1 1 1],...
       'Position', [10 10 100 50]);
h2 = uicontrol(f1, 'Style', 'edit',...
       'String', 'Copy',...
       'BackgroundColor', [1 1 1],...
       'Position', [120 10 100 50]);
h3 = uicontrol(f1, 'Style', 'edit',...
       'String', 'Paste',...
       'BackgroundColor', [1 1 1],...
       'Position', [230 10 100 50]);

% For single edit box object

% For selected edit box object

% For all the edit boxes in a figure
copy_paste(gcf) or copy_paste(f1)

Your comments and suggestions are most welcomed.


Findjobj Find Java Handles Of Matlab Graphic Objects inspired this file.

MATLAB release MATLAB 7.10 (R2010a)
Other requirements Java needs to be enabled.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.

Contact us