Verfasst am: 08.12.2011, 10:51
Titel: Re: zweite Gui oeffnen,wenn gui ohne guide
Hallo chris4aus,
Die Fehlermeldung besagt, dass "help_window_woguide()" keine Ausgaben erzeugt. Wieso das so ist, kann man nicht erraten. Der Debugger kann Dir aber weiterhelfen: "dbstop if error".
Ich habe jetzt ein wenig rumgespielt: Und du hattest Recht:
Ich musste die Figure-Einfuegen und jetzt laeuft es ohne Fehler.
Hier der Code:
Code:
function he_wi = help_window_woguide
% get screensize
scrsz = get(0,'ScreenSize');
% get main window
help_window1 = figure('MenuBar','none',...
'Name','GUI - erstellt ohne GUIDE',...
'ToolBar','none',...
'Position',[.1*scrsz(3),.1*scrsz(4),...
.85*scrsz(3),.85*scrsz(4)]);
% tabs for help
h = uitabgroup('v0'); drawnow;
t1 = uitab('v0', h, 'title', 'Overview');
t2 = uitab('v0', h, 'title', 'Opening remarks');
% overview text
overview_text = uicontrol(t1,'Style','text',...
'Tag','overview_text',...
'FontSize',12,...
'Units','normalized',...
'Background',[.96 .92 .92],...
'HorizontalAlignment','left',...
'Position',[.01,.75,.5,.4]);
text_over{1} = 'Program can be used to set up a scaffold in the electrospinning machine.';
text_over{end+1} = 'It constructs a scaffold by setting up different major compound layers.';
text_over{end+1} = 'Each major compound layer consists of a specified number of minor compound layers.';
text_over{end+1} = 'Each minor compound layer consists of a certain number of layers, specified by the rotation angle.';
text_over{end+1} = 'Each layer within the minor coumpound layer consists of the same pattern though at different rotations.';
text_over{end+1} = 'It is built by using sub blocks which are placed next to each other.';
[outstring,newpos] = textwrap(overview_text,text_over);
set(overview_text,'String',outstring,'Position',newpos);
% % enter graphic % axes_scaffold = uicontrol(t1,'Style','frame',... % 'Tag','axes_scaffold',... % 'Units','centimeters',... % 'Background',[.96 .92 .92],... % 'Position',[0.3,5.2,19,4]); % axes(axes_scaffold); % pick axes object
G1=imread('scaffold_111208_2.jpg','jpg'); % read in picture
hand1 = image(G1); % display picture % set(hand1,'OuterPosition',[10 10 100 90]); % axis image; axis off
G2=imread('xy-view_scaffold.jpg','jpg'); % read in picture
hand2 = image(G2); % display picture % set(gca,'OuterPosition',[10 10 100 90]); % axis image; axis off
% opening remarks
open_text = uicontrol(t2,'Style','text',...
'Tag','open_text',...
'FontSize',12,...
'Units','normalized',...
'Background',[.96 .92 .92],...
'HorizontalAlignment','left',...
'Position',[.01,.78,.5,.4]);
text{1} = 'Enter name - if name already exists, you can load the existing values or choose to overwrite them';
text{end+1} = ['Choose either height or stage area to characterise scaffold. ',...
'The other option will then be calculated automatically.'];
text{end+1} = ['Trapezium option will ensure that the resulting scaffold ',...
'has a useful area as defined by the smallest layer width ',...
'(x axis). Otherwise the entered layer width might be reduced ',...
'due to the offset.'];
[outstring1,newpos1] = textwrap(open_text,text);
set(open_text,'String',outstring1,'Position',newpos1);
% ok button
handles.pushbutton1 = uicontrol(help_window1,'Style','pushbutton',...
'String','OK',...
'FontWeight','bold',...
'FontSize',10,...
'Units','normalized',...
'BackgroundColor','g',...
'Position',[.91,.05,.05,.03],...
'Callback',@ok_callback);
% save structure guidata(help_window1,handles);
he_wi = help_window1;
function ok_callback(~,~) % close help_window close(help_window1);
end end
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.