{"id":2454,"date":"2009-08-07T11:56:31","date_gmt":"2009-08-07T11:56:31","guid":{"rendered":"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/07\/structdlg-part-2-of-2\/"},"modified":"2016-05-18T11:25:21","modified_gmt":"2016-05-18T15:25:21","slug":"structdlg-part-2-of-2","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/07\/structdlg-part-2-of-2\/","title":{"rendered":"StructDlg (Part 2 of 2)"},"content":{"rendered":"<div class=\"content\">\r\n\r\n<a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/5021\">Bob<\/a>'s pick this week is <tt><a href=\"https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/6668-structdlg-structure-based-gui-definition\">StructDlg<\/a><\/tt> by Alon Fishbach.\r\n\r\n&nbsp;\r\n\r\nThis is a follow-on from <a href=\"https:\/\/blogs.mathworks.com\/pick\/2009\/07\/31\/structdlg-part-1-of-2\/\">last week's pick<\/a>.\r\n\r\nDo you build MATLAB applications with a graphical user interface (GUI)? Do want to provide your end users with rich, powerful\r\ndialogs to manage their work flow? Would you prefer to <i>not<\/i> start from scratch? Then <tt>StructDlg<\/tt> may be for you. Be sure to review Alon's examples for a quick tour of the many capabilities he implemented. I can see using this to tweak model parameters or manage user preferences\r\nfor starters.\r\n\r\n<img decoding=\"async\" src=\"https:\/\/blogs.mathworks.com\/images\/pick\/..\/..\/images\/pick\/structdlgs2.png\" alt=\"\" hspace=\"5\" vspace=\"5\" \/>\r\n\r\nHow could <tt>StructDlg<\/tt> make your MATLAB program more user friendly?\r\n\r\n<a href=\"https:\/\/blogs.mathworks.com\/pick\/?p=2454#respond\">Comments?<\/a>\r\n\r\n<script>\/\/ <![CDATA[\r\nfunction grabCode_3b6cd972658644afb35906eecfacb477() {\r\n        \/\/ Remember the title so we can use it in the new page\r\n        title = document.title;\r\n\r\n        \/\/ Break up these strings so that their presence\r\n        \/\/ in the Javascript doesn't mess up the search for\r\n        \/\/ the MATLAB code.\r\n        t1='3b6cd972658644afb35906eecfacb477 ' + '##### ' + 'SOURCE BEGIN' + ' #####';\r\n        t2='##### ' + 'SOURCE END' + ' #####' + ' 3b6cd972658644afb35906eecfacb477';\r\n    \r\n        b=document.getElementsByTagName('body')[0];\r\n        i1=b.innerHTML.indexOf(t1)+t1.length;\r\n        i2=b.innerHTML.indexOf(t2);\r\n \r\n        code_string = b.innerHTML.substring(i1, i2);\r\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\r\n\r\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \r\n        \/\/ in the XML parser.\r\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\r\n        \/\/ doesn't go ahead and substitute the less-than character. \r\n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\r\n\r\n        author = 'Robert Bemis';\r\n        copyright = 'Copyright 2009 The MathWorks, Inc.';\r\n\r\n        w = window.open();\r\n        d = w.document;\r\n        d.write('\r\n\r\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add author and copyright lines at the bottom if specified.\r\n        if ((author.length > 0) || (copyright.length > 0)) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (author.length > 0) {\r\n                d.writeln('% _' + author + '_');\r\n            }\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\r\n\r\n\r\n\\n');\r\n      \r\n      d.title = title + ' (MATLAB code)';\r\n      d.close();\r\n      }\r\n\/\/ ]]><\/script>\r\n<p style=\"text-align: right; font-size: xx-small; font-weight: lighter; font-style: italic; color: gray;\">\r\n<a><span style=\"font-size: x-small; font-style: italic;\">Get\r\nthe MATLAB code\r\n<noscript>(requires JavaScript)<\/noscript><\/span><\/a>\r\n\r\nPublished with MATLAB\u00ae 7.9<\/p>\r\n\r\n<\/div>\r\n<!--\r\n3b6cd972658644afb35906eecfacb477 ##### SOURCE BEGIN #####\r\n%%\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/authors\/5021 Bob>'s\r\n% pick this week is\r\n% |<https:\/\/www.mathworks.com\/matlabcentral\/fileexchange\/6668-structdlg-structure-based-gui-definition StructDlg>|\r\n% by Alon Fishbach.\r\n%%\r\n% This is a follow-on from\r\n% <https:\/\/blogs.mathworks.com\/pick\/2009\/07\/31\/structdlg-part-1-of-2\/ last week's pick>.\r\n%%\r\n% Do you build MATLAB applications with a graphical user interface (GUI)? Do\r\n% want to provide your end users with rich, powerful dialogs to manage their\r\n% work flow? Would you prefer to _not_ start from scratch? Then |StructDlg|\r\n% may be for you. Be sure to review Alon's\r\n% <https:\/\/www.mathworks.com\/matlabcentral\/fx_files\/6668\/1\/content\/structdlg\/ref\/StructDlg.html examples>\r\n% for a quick tour of the many capabilities he implemented. I can see using\r\n% this to tweak model parameters or manage user preferences for starters.\r\n%%\r\n% <<..\/images\/pick\/structdlgs2.png>>\r\n%%\r\n% How could |StructDlg| make your MATLAB program more user friendly?\r\n%%\r\n% <https:\/\/blogs.mathworks.com\/pick\/?p=2454#respond Comments?>\r\n\r\n##### SOURCE END ##### 3b6cd972658644afb35906eecfacb477\r\n-->","protected":false},"excerpt":{"rendered":"<p>\r\n\r\nBob's pick this week is StructDlg by Alon Fishbach.\r\n\r\n&nbsp;\r\n\r\nThis is a follow-on from last week's pick.\r\n\r\nDo you build MATLAB applications with a graphical user interface (GUI)? Do want to... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/pick\/2009\/08\/07\/structdlg-part-2-of-2\/\">read more >><\/a><\/p>","protected":false},"author":46,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[16],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2454"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/users\/46"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/comments?post=2454"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2454\/revisions"}],"predecessor-version":[{"id":7339,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/posts\/2454\/revisions\/7339"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/media?parent=2454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/categories?post=2454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/pick\/wp-json\/wp\/v2\/tags?post=2454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}