<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CyphersTECH Consulting &#187; Code Snipets</title>
	<atom:link href="http://www.cypherstech.com/category/code-snipets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.cypherstech.com</link>
	<description>turning possibilities in to realities</description>
	<lastBuildDate>Sun, 16 May 2010 15:29:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>REALbasic and Snow Leopard: Redraw what?!</title>
		<link>http://www.cypherstech.com/2010/01/realbasic-and-snow-leopard-redraw-what/</link>
		<comments>http://www.cypherstech.com/2010/01/realbasic-and-snow-leopard-redraw-what/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 05:15:35 +0000</pubDate>
		<dc:creator>Anthony G. Cyphers</dc:creator>
				<category><![CDATA[Code Snipets]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[clients]]></category>
		<category><![CDATA[flicker]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[realbasic]]></category>
		<category><![CDATA[ui]]></category>

		<guid isPermaLink="false">http://www.cypherstech.com/?p=746</guid>
		<description><![CDATA[A customer has tasked me with updating some of the UI elements in their application. Among the problems they listed was a redraw bug in Snow Leopard, where the controls on windows with a set background color would display a slightly different color in their background even with the Composite property set to True. After [...]]]></description>
			<content:encoded><![CDATA[<p>A customer has tasked me with updating some of the UI elements in their application.  Among the problems they listed was a redraw bug in Snow Leopard, where the controls on windows with a set background color would display a slightly different color in their background even with the Composite property set to True.  After about an hour of testing different workarounds, I found what I believe to be an excellent solution.<br />
<span id="more-746"></span><br />
In this application, all of the windows have a set background color, but only a few displayed the error.  I had absolutely no luck in determining the difference, so I can only assume that it&#8217;s an inconsistent REALbasic bug.  Here&#8217;s how I fixed it:</p>
<ol>
<li>Add a new object to your project, mine is named &#8220;WindowHack,&#8221; and set it&#8217;s Super to &#8220;Window.&#8221;</li>
<li>Open the window subclass, and navigate to the &#8220;Paint&#8221; event.</li>
<li>Inside the &#8220;Paint&#8221; event, add the following block of code:<br />
<code>  #if TargetMacOS then<br />
    If Me.HasBackColor Then<br />
      g.ForeColor = me.BackColor<br />
      g.FillRect( 0, 0, g.Width, g.Height )<br />
    End If<br />
  #endif</code></li>
<li>Now set the Super of the windows with the problem to &#8220;WindowHack&#8221; and test.</li>
</ol>
<p>This seemed to be the most elegant solution I could find to the problem and, quite honestly, the root of the issue still eludes me.  Any thoughts on what might be causing this inconsistency?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.cypherstech.com/2010/01/realbasic-and-snow-leopard-redraw-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
