I don&#39;t know about DHTML. But&nbsp; this was the only workaround that I could<br>find for the Flash runtime. It would be nice to make an extension class of LzText that <br>encapsulates this though, for people to use. <br><br>
<br><br><br><div class="gmail_quote">On Mon, Apr 14, 2008 at 5:53 PM, Greg Denton &lt;<a href="mailto:greg.denton@gmail.com">greg.denton@gmail.com</a>&gt; wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Looks interesting. A couple of questions, though: (1) will this work<br>
with dhtml? (2) seems like the simplest UI would be: swap the fg/bg<br>
colors for the selected chars, wouldn&#39;t it be best to build that into<br>
the system, or allow some way to configure it explicitly?<br>
<br>
Do the css style sheets affect edittext at all? If so, is there a way<br>
of specifying all 4 colors that way?<br>
<br>
Thanks.<br>
<div><div></div><div class="Wj3C7c"><br>
On Mon, Apr 14, 2008 at 2:42 PM, Henry Minsky &lt;<a href="mailto:henry.minsky@gmail.com">henry.minsky@gmail.com</a>&gt; wrote:<br>
&gt; There is an article I found which suggests a workaround using color<br>
&gt; transforms<br>
&gt;<br>
&gt; &nbsp;<a href="http://www.digitalflipbook.com/archives/flash/" target="_blank">http://www.digitalflipbook.com/archives/flash/</a><br>
&gt;<br>
&gt; Something like this may work. It is following the idea in the article,<br>
&gt; &nbsp;to basically invert the color transform on the<br>
&gt; &nbsp;movieclip containing the text field, and then set the text foreground<br>
&gt; &nbsp;and background color to the inverse of what you want.<br>
&gt;<br>
&gt; &nbsp;I just did this by experimenting with black and white, ideally you<br>
&gt; &nbsp;would use something based on their<br>
&gt; &nbsp;approach of actually inverting the colors using the color transform based<br>
&gt; on the<br>
&gt; &nbsp;foreground and bgcolor of the textfield that you desire.<br>
&gt;<br>
&gt;<br>
&gt; &nbsp;&lt;canvas&gt;<br>
&gt; &nbsp; &nbsp;&lt;simplelayout axis=&quot;y&quot;/&gt;<br>
&gt; &nbsp; &nbsp;&lt;class name=&quot;myinputtext&quot; extends=&quot;inputtext&quot; &gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &lt;handler name=&quot;oninit&quot;&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var field = this.sprite.__LZtextclip;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; field.backgroundColor = 0xffffff;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; field.textColor = 0x000000;<br>
&gt;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // invert the color transform for the sprite<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var colorTrans = {<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ra: -100,// &nbsp;is the percentage for the red component (-100 to<br>
&gt; 100).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rb: &nbsp;0xd3,// is the offset for the red component (-255 to 255).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ga: -100, // is the percentage for the green component<br>
&gt; &nbsp;(-100 to 100).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; gb: 0xd3, // is the offset for the green component (-255 to<br>
&gt; 255).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ba: -100,// is the percentage for the blue component (-100 to<br>
&gt; 100).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; bb: 0xd3,// is the offset for the blue component (-255 to 255).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; aa: 100,// is the percentage for alpha (-100 to 100).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ab: 0 // is the offset for alpha (-255 to 255).<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; };<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;this.sprite.setColorTransform<br>
&gt; (colorTrans);<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp;&lt;/handler&gt;<br>
&gt; &nbsp; &nbsp; &lt;/class&gt;<br>
&gt; &nbsp; &nbsp;&lt;myinputtext name=&quot;field&quot; width=&quot;300&quot; fgcolor=&quot;0xFFFFFF&quot;<br>
&gt; &nbsp;bgcolor=&quot;0x000000&quot; height=&quot;30&quot; fontsize=&quot;13&quot;&gt;Is this selection<br>
&gt; &nbsp;visible?&lt;/myinputtext&gt;<br>
&gt; &nbsp; &nbsp;&lt;myinputtext name=&quot;field2&quot; width=&quot;300&quot; fgcolor=&quot;0x999999&quot;<br>
&gt; &nbsp;bgcolor=&quot;0x333333&quot; height=&quot;30&quot; fontsize=&quot;13&quot;&gt;Is this selection<br>
&gt; &nbsp;visible?&lt;/myinputtext&gt;<br>
&gt;<br>
&gt;<br>
&gt; &nbsp;&lt;/canvas&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Mon, Apr 14, 2008 at 5:02 PM, Greg Denton &lt;<a href="mailto:greg.denton@gmail.com">greg.denton@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt; &gt; My app changes the color of text depending on what the text is. When<br>
&gt; &gt; it changes to a lighter shade of gray (via setColor) the hiliting, or<br>
&gt; &gt; whatever the background color is called when chars are selected, is<br>
&gt; &gt; automatically changed to the same gray and completely masks the text.<br>
&gt; &gt; Can&#39;t figure out how to fix this. And, the textselectedcolor,<br>
&gt; &gt; texthilitecolor in the component styles don&#39;t seem to work with<br>
&gt; &gt; edittext. Running on <a href="http://4.0.11." target="_blank">4.0.11.</a> Thanks for any tips.<br>
&gt; &gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; --<br>
&gt; Henry Minsky<br>
&gt; Software Architect<br>
&gt; <a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Henry Minsky<br>Software Architect<br><a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br><br>