Have a pop-up dialog which has license agreement?
2 次查看(过去 30 天)
显示 更早的评论
In GUI, is there a way to first have a pop-up dialog box launch and show my license agreement, with scroll bars, accept and decline buttons. Accept moves user to application, Decline exits the program?
Thanks
1 个评论
Geoff Hayes
2016-3-5
A - this is the third (!) time that you have asked this question. Please stopping duplicating your question.
See http://www.mathworks.com/matlabcentral/answers/271455-gui-question-have-a-pop-up-dialog-which-has-license-agreement-accept-decline-pushbuttons and http://www.mathworks.com/matlabcentral/answers/271522-gui-question-have-a-pop-up-dialog-which-has-license-agreement-with-a-scroll-bar-accept-decline-pus
回答(1 个)
Geoff Hayes
2016-3-5
A - I would create a separate GUI to handle the licensing information. When the user presses the Accept button, then you would close this GUI and launch the main one. If the user presses Decline, then just close this GUI and do nothing.
2 个评论
Geoff Hayes
2016-3-5
A - yes, you would create a separate GUI (using GUIDE) so that you have another m and fig file for that introductory or licensing GUI. In that GUI, you would have then have two buttons with their callbacks defined as
% --- Executes on button press in acceptButton.
function acceptButton_Callback(hObject, eventdata, handles)
% hObject handle to acceptButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% launch the main GUI
mainGui;
close(handles.figure1);
% --- Executes on button press in declineButton.
function declineButton_Callback(hObject, eventdata, handles)
% hObject handle to declineButton (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close(handles.figure1);
Where mainGui is the name of the second or main GUI that you wish th user to interact with.
See the attached for an example.
另请参阅
类别
在 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!