{"id":188,"date":"2009-08-21T14:03:46","date_gmt":"2009-08-21T18:03:46","guid":{"rendered":"https:\/\/clarionsharp.com\/blog\/?p=188"},"modified":"2009-08-21T14:03:46","modified_gmt":"2009-08-21T18:03:46","slug":"freeze-that-control","status":"publish","type":"post","link":"https:\/\/clarionsharp.com\/blog\/freeze-that-control\/","title":{"rendered":"Freeze that control"},"content":{"rendered":"<p>Clarion 7.1 introduces two new functions; FREEZE and UNFREEZE.\u00a0 FREEZE\/UNFREEZE are used in tandem to suppress redrawing while you adjust multiple attributes of a control. For example, you would typically call the FREEZE method, then set the Size, Location, Text, or Color properties of the control, and then call the\u00a0 UNFREEZE method to enable the changes to take effect.\u00a0 This can increase the performance of applications with many controls, and eliminate screen flicker when dynamically creating controls or adjusting their properties.<\/p>\n<p>The syntax is:<\/p>\n<p><span style=\"color: #993300;\">FREEZE (SIGNED feq),SIGNED<\/span><\/p>\n<p>FREEZE suspends redrawing of the control which is identified by the feq parameter.<br \/>\nThe return value must be passed to a paired UNFREEZE.<\/p>\n<p><span style=\"color: #993300;\">UNFREEZE (SIGNED feq, SIGNED state)<\/span><\/p>\n<p>This function resumes redrawing of the control previously suspended by FREEZE.<br \/>\nThe second parameter is a value returned by last FREEZE for that control which has not been closed<br \/>\nby paired UNFREEZE.<\/p>\n<p style=\"padding-left: 30px;\">Calls to FREEZE can be nested. Every such call must have its paired UNFREEZE,<br \/>\nfor example:<br \/>\n<code><br \/>\n<span style=\"color: #993300;\">x1# = FREEZE (feq)<br \/>\n...<br \/>\nx2# = FREEZE (feq)<br \/>\n...<br \/>\nUNFREEZE (feq, x2#)<br \/>\n...<br \/>\nUNFREEZE (feq, x1#)<\/span><\/code><\/p>\n<p>FREEZE and UNFREEZE must be properly paired: if there isn&#8217;t a paired call to UNFREEZE for an executed FREEZE, the control cannot be redrawn. The UNFREEZE function forces redrawing of the control.<\/p>\n<p>(note: FREEZE\/UNFREEZE cannot be used for menu items)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Clarion 7.1 introduces two new functions; FREEZE and UNFREEZE.\u00a0 FREEZE\/UNFREEZE are used in tandem to suppress redrawing while you adjust multiple attributes of a control. For example, you would typically call the FREEZE method, then set the Size, Location, Text, or Color properties of the control, and then call the\u00a0 UNFREEZE method to enable the &hellip; <a href=\"https:\/\/clarionsharp.com\/blog\/freeze-that-control\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Freeze that control<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-188","post","type-post","status-publish","format-standard","hentry","category-clarionnews"],"_links":{"self":[{"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/posts\/188","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/comments?post=188"}],"version-history":[{"count":0,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/posts\/188\/revisions"}],"wp:attachment":[{"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/media?parent=188"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/categories?post=188"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/clarionsharp.com\/blog\/wp-json\/wp\/v2\/tags?post=188"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}