Error in ==> untitled>untitled_OutputFcn at 105
varargout{1} = handles.output;
Error in ==> gui_mainfcn at 265
feval(gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles);
Error in ==> untitled at 42
gui_mainfcn(gui_State, varargin{:});
und wenn ich eine Datei ins Drop-in-Feld ziehe diese:
Zitat:
??? Error using ==> comeventcallback at 25
Error firing event 'OLEDragDrop' to 'ShowFileNameOnDrop'.
Warning: Error occurred while evaluating listener callback.
was GUIs angeht bin ich noch total am anfang des Verständnisses, also wenn da einer durchschaut, wär schön, wenn ich ein Tipp kriegen würde, weil das Feature wäre schon ziemlich nett
Code:
functionvarargout = untitled(varargin) % UNTITLED M-file for untitled.fig % UNTITLED, by itself, creates a new UNTITLED or raises the existing % singleton*.
%
% H = UNTITLED returns the handle to a new UNTITLED or the handle to % the existing singleton*.
%
% UNTITLED('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in UNTITLED.M with the given input arguments.
%
% UNTITLED('Property','Value',...) creates a new UNTITLED or raises the % existing singleton*. Starting from the left, property value pairs are % applied to the GUI before untitled_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to untitled_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one % instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help untitled
% Last Modified by GUIDE v2.5 17-Oct-2009 14:12:08
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @untitled_OpeningFcn, ...
'gui_OutputFcn', @untitled_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
ifnargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
% --- Executes just before untitled is made visible. function untitled_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 untitled (see VARARGIN)
% Choose default command line output for untitled
handles.output = hObject;
pos=get(gcf,'position');
color=get(gcf,'color');
%use this one to put a file name into a box uicontrol('style','listbox','position',[pos(3)*.1250 pos(3)*.8100],'tag','FileNameList');% create a listbox to show filenames
ProgID='RICHTEXT.RichtextCtrl.1';
h1 = actxcontrol(ProgID, [pos(3)*.1355 pos(3)*.820],gcf,{'OLEDragDrop',@ShowFileNameOnDrop});
set(h1,'OLEDropMode','rtfOLEDropManual');
set(h1,'text','Drag file into this window to populate the list with filenames...') uicontrol('style','text','string','File Name Loader','position',[pos(3)*.1375 pos(3)*.820],...
'backgroundcolor',color,'fontweight','bold');
% UIWAIT makes untitled wait for user response (see UIRESUME) % uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line. functionvarargout = untitled_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT); % hObject handle to figure % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure varargout{1} = handles.output;
%use this one to put a file name into a box uicontrol('style','listbox','position',[pos(3)*.5510 pos(3)*4130],'tag','FileNameList');% create a listbox to show filenames
ProgID='RICHTEXT.RichtextCtrl.1';
h1 = actxcontrol(ProgID, [pos(3)*1.5655 pos(3)*220],gcf,{'OLEDragDrop',@ShowFileNameOnDrop});
set(h1,'OLEDropMode','rtfOLEDropManual');
set(h1,'text','Drag file into this window to populate the list with filenames...')
Verfasst am: 08.02.2011, 12:10
Titel: How to fix Invalid ProgID 'RICHTEXT.RichtextC
You can fix the MATLAB Control creation failed. Invalid ProgID 'RICHTEXT.RichtextCtrl.1' error by bring up the windows cmd prompt and type "regsvr32 richtx32.ocx".
Paul,
I'm not exactly sure what error you got, but my guess is
that it must be because the activex
control 'RICHTEXT.RichtextCtrl.1' is not available on your
system. Are you running windows? If so, at the Matlab
command prompt try '[h info]=actxcontrolselect'. This
should bring up a window with all the activex controls on
your machine. You should see one called Microsoft Rich
Textbox Control 6.0 (SP6). Let me know if it isn't
available. I can send it to you. Alternatively, there
should be a file (C:\WINDOWS\system32\richtx32.ocx) in your
windows folder for this control. If it is there, then
bring up the windows cmd prompt and type "regsvr32
richtx32.ocx" I hope this helps. Sorry for not providing
more documentation with this. I figured it would work for
windows users without trouble.
MatLabNooB hat Folgendes geschrieben:
LittleX, kannst du dir das erklären? ich versteh nur bahnhof
Zitat:
info = actxcontrollist;
>> pos = find(strcmp('RICHTEXT.RichtextCtrl.1',info))
pos =
460
??? Error using ==> feval
Error: Keine Lizenz für die Verwendung dieser Klasse vorhanden
Error in ==> actxcontrol>createControl at 240
ctrl = feval(comstr, 'control', position, parent, '', filename, hwnd, licensekey,
false,parent_string);
Error in ==> actxcontrol at 212
hControl = createControl;
Error in ==> SPT_GUI>SPT_GUI_OpeningFcn at 77
h1 = actxcontrol(ProgID, [pos(3)*1.5 655 pos(3)*2
20],gcf,{'OLEDragDrop',@ShowFileNameOnDrop});
Error in ==> gui_mainfcn at 221
feval(gui_State.gui_OpeningFcn, gui_hFigure, [], guidata(gui_hFigure), varargin{:});
Error in ==> SPT_GUI at 42
gui_mainfcn(gui_State, varargin{:});
Einstellungen und Berechtigungen
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.