{"id":591,"date":"2018-05-30T21:31:13","date_gmt":"2018-05-30T12:31:13","guid":{"rendered":"https:\/\/www.oqiita.com\/?p=591"},"modified":"2018-06-28T10:50:01","modified_gmt":"2018-06-28T01:50:01","slug":"%e3%80%90bizbrowser-bizdesigner%e3%80%91option%e3%83%9c%e3%82%bf%e3%83%b3%e3%81%aeonchange","status":"publish","type":"post","link":"https:\/\/www.oqiita.com\/?p=591","title":{"rendered":"\u3010BizBrowser\/BizDesigner\u3011Option\u30dc\u30bf\u30f3\u306eOnChange"},"content":{"rendered":"<p>\u4ed5\u4e8b\u3067\u4f7f\u3046\u6a5f\u4f1a\u304c\u591a\u3044\u306e\u3067\u3001\u3069\u3046\u3057\u3066\u3082Biz\u306e\u60c5\u5831\u767a\u4fe1\u3070\u3063\u304b\u306b\u306a\u308b<br \/>\n\uff08\u3042\u3093\u307e\u308a\u597d\u304d\u3058\u3083\u306a\u3044\uff57\uff09<br \/>\n<!--more--><\/p>\n<p>OnChange\u30a4\u30d9\u30f3\u30c8\u306f\u5024\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u8a2d\u5b9a\u3057\u3066\u3082\u52d5\u3044\u3066\u3057\u307e\u3046\u306e\u3067<br \/>\n\u30d5\u30a9\u30fc\u30e0\u306b\u5909\u6570\u3092\u5ba3\u8a00\u3057\u3066\u3001\u524d\u306e\u5024\u304b\u3089\u5909\u308f\u3063\u305f\u304b\u3069\u3046\u304b\u3092\u5224\u5b9a\u3057\u3066\u307e\u3059\u3002<br \/>\nOnChange \u3092\u52d5\u4f5c\u3055\u305b\u306a\u3044\u305f\u304f\u306a\u3044\u5834\u5408\u306f<br \/>\nOption\u30dc\u30bf\u30f3\u306b\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u524d\u306b\u30d5\u30a9\u30fc\u30e0\u306b\u5ba3\u8a00\u3057\u305f\u5909\u6570\u306bOption\u30dc\u30bf\u30f3\u306b\u8a2d\u5b9a\u3059\u308b\u5024\u3092\u524d\u3082\u3063\u3066\u8a2d\u5b9a\u3059\u308b\u3053\u3068\u3067<br \/>\nOnChange\u5185\u306eIF\u6587\u3067\u5373\u30ea\u30bf\u30fc\u30f3\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\u3002<\/p>\n<pre class=\"line-numbers\"><code class=\"language-javascript\">Form Form1 {\n\tX = 0;\n\tY = 0;\n\tWidth = 274;\n\tHeight = 256;\n\t\n\tNumber optionOldValue = \"\";\n\t\t\n\tOptionButton OptionButton1 {\n\t\tX = 13;\n\t\tY = 15;\n\t\tWidth = 240;\n\t\tHeight = 72;\n\t\tUseChange = $TRUE;\n\t\t\n\t\tOptionItem OptionItem1[] {\n\t\t\tHeight = 20;\n\t\t\tWidth = 150;\n\t\t\tLayoutSpacing = 0;\n\t\t\tLayoutMargin = 2;\n\t\t\tLayout = $VERTICAL;\n\t\t\tLayoutSpacing = 2;\n\t\t}\n\t\t\n\t\tFunction OnChange( e ) {\n\t\t\t\/* \u30c7\u30d0\u30c3\u30b0 *\/\n\t\t\tprint(this.Name  + \" - \" + e.EventName + \"[\" + str(this.Value) + \"]\");\n\t\t\t\n\t\t\t\/* \u524d\u306e\u5024\u3068\u4eca\u306e\u5024\u3092\u6bd4\u8f03\u3057\u3066\u540c\u3058\u5834\u5408\u306f\u4f55\u3082\u3057\u306a\u3044 *\/\n\t\t\tif(^.optionOldValue == this.Value){\n\t\t\t\t^.optionOldValue = this.Value;\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t\/* \u5024\u3092\u5909\u66f4\u3059\u308b\u304b\u78ba\u8a8d\u3059\u308b *\/\n\t\t\tif(^.Kakunin() == $FALSE){\n\t\t\t\t\/* \u5024\u3092\u5143\u306b\u623b\u3059 *\/\n\t\t\t\tthis.Value = ^.optionOldValue;\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t\/* \u5024\u3092\u9000\u907f\u3059\u308b *\/\n\t\t\t\t^.optionOldValue = this.Value;\n\t\t\t\t\n\t\t\t\t\/* \u672c\u5f53\u306b\u52d5\u304b\u3057\u305f\u3044\u51e6\u7406 \u21d2 \u4eca\u56de\u306f\u30c6\u30ad\u30b9\u30c8\u30dc\u30c3\u30af\u30b9\u306b\u5024\u3092\u8a2d\u5b9a\u3059\u308b\u3002*\/\n\t\t\t\t^.TextBox1.Value = this.Value;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}\n\t\n\tTextBox TextBox1 {\n\t\tX = 13;\n\t\tY = 211;\n\t\tWidth = 240;\n\t\tHeight = 24;\n\t}\n\t\n\tFunction Kakunin(){\n\t\tvar ret = \/\/.MessageBox(\"\u5024\u3092\u5909\u66f4\u3057\u3066\u3088\u308d\u3057\u3044\u3067\u3059\u304b\uff1f\", \"\", $OKCANCEL);\n\t\tif (ret == CancelSelected) {\n\t\t\treturn $FALSE;\n\t\t} else {\n\t\t\treturn $TRUE;\n\t\t}\n\t}\n\t\n\tButton Button1 {\n\t\tX = 13;\n\t\tY = 96;\n\t\tWidth = 240;\n\t\tHeight = 106;\n\t\tTitle = \"\u5024\u3092\u521d\u671f\u5316\";\n\t\t\n\t\tFunction OnTouch( e ) {\n\t\t\tif (^.OptionButton1.Value != ^.optionOldValue) {\t\t\/* \u8a2d\u5b9a\u3059\u308b\u5024\u304c\u9055\u3046\u304b\u3069\u3046\u304b\u78ba\u8a8d *\/\n\t\t\t\t^.optionOldValue = 0;\n\t\t\t}\n\t\t\t\/* \u5024\u3092\u521d\u671f\u5316 *\/\n\t\t\t^.OptionButton1.Value = 0;\n\t\t}\n\t}\n\t\n\tif ( !$DESIGNTIME ) {\n\t\t\n\t\toptionOldValue = 0;\t\/* \u2193\u3067CSV\u3092\u8a2d\u5b9a\u3059\u308b\u3068 NULL \u304b\u3089 001 \u306b\u306a\u308b\u306e\u3067 OnChange\u304c\u52d5\u304f *\/\n\t\t\n\t\t\/* \u30aa\u30d7\u30b7\u30e7\u30f3\u30dc\u30bf\u30f3\u306e\u5024\u3092\u8a2d\u5b9a *\/\n\t\tOptionButton1.OptionItem1  csv(.title, .value) {\n\t\t\t\"\u30bf\u30a4\u30c8\u30eb1\",\"001\"\n\t\t\t\"\u30bf\u30a4\u30c8\u30eb2\",\"002\"\n\t\t\t\"\u30bf\u30a4\u30c8\u30eb3\",\"003\"\n\t\t\t\"\u30bf\u30a4\u30c8\u30eb4\",\"004\"\n\t\t\t\"\u30bf\u30a4\u30c8\u30eb5\",\"005\"\n\t\t\t\"\u30bf\u30a4\u30c8\u30eb6\",\"006\"\n\t\t};\n\t\t\n\t}\n}\n\n<\/code><\/pre>\n<div class=\"memo \">\n<div class=\"memo_ttl dfont\"> \u30e1\u30e2<\/div>\n<p>\u30d5\u30e9\u30b0\u3067\u7ba1\u7406\u3057\u3066\u3082\u826f\u304b\u3063\u305f\u304b\u3082\u3057\u308c\u3093\uff01<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u4ed5\u4e8b\u3067\u4f7f\u3046\u6a5f\u4f1a\u304c\u591a\u3044\u306e\u3067\u3001\u3069\u3046\u3057\u3066\u3082Biz\u306e\u60c5\u5831\u767a\u4fe1\u3070\u3063\u304b\u306b\u306a\u308b \uff08\u3042\u3093\u307e\u308a\u597d\u304d\u3058\u3083\u306a\u3044\uff57\uff09<\/p>\n","protected":false},"author":1,"featured_media":734,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[22,23],"tags":[24],"class_list":{"0":"post-591","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-bizbrowser","8":"category-bizdesigner","9":"tag-biz","10":"entry"},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.oqiita.com\/wp-content\/uploads\/2017\/07\/sango_biz_icatch.png","jetpack_shortlink":"https:\/\/wp.me\/p8QluP-9x","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/posts\/591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=591"}],"version-history":[{"count":6,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/posts\/591\/revisions"}],"predecessor-version":[{"id":935,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/posts\/591\/revisions\/935"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=\/wp\/v2\/media\/734"}],"wp:attachment":[{"href":"https:\/\/www.oqiita.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.oqiita.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}