MatLab在RICHTEXT.RichtextCtrl.1上使用drag n dop

时间:2013-01-30 10:54:56

标签: matlab activex

我尝试使用MS ActiveX RICHTEXT.RichtextCtrl.1在MatLab应用程序中拖放。

只要我把所有代码都放到样本图上,一切正常。为方便起见,我想使用该指南。我刚刚实现了如下所示的必要代码。当我尝试将文件拖到ActiveX时,它将由ActiveX本身处理,例如该文件将显示为ActiveX的附件。我的功能没有被调用。

有人有想法解决这个问题吗?

function iTecLogfile_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to iTecLogfile (see VARARGIN)

% Choose default command line output for iTecLogfile
handles.output = hObject;
%handles.activex1.registerevent({'KeyUp', @richtextKeyUp});
handles.activex1.registerevent({'OLEDragDrop', @richtextOLEDragDrop});
set(handles.activex1,'OLEDropMode','rtfOLEDropManual');

% Update handles structure
guidata(hObject, handles);
data = struct();
setappdata(handles.figure1,'data',data);

0 个答案:

没有答案