Determine if user presses cancel in print(g,'-dsetup')
Show older comments
I want to run a print command from a script, but first I want to run the setup [print(g,'-dsetup')]. But if the user presses cancel in the setup window, I want to cancel the print command. I don't know how to do that. There doesn't seem to be any return message from the print setup command. Suggestions?
Answers (1)
Fangjun Jiang
on 17 May 2011
0 votes
Would printdlg(g) work? The user can set up options. Then, if "Ok" is clicked, the figure is printed. if "Cancel" is clicked, nothing happens.
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!