I don't know about DHTML. But 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 <<a href="mailto:greg.denton@gmail.com">greg.denton@gmail.com</a>> 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'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 <<a href="mailto:henry.minsky@gmail.com">henry.minsky@gmail.com</a>> wrote:<br>
> There is an article I found which suggests a workaround using color<br>
> transforms<br>
><br>
> <a href="http://www.digitalflipbook.com/archives/flash/" target="_blank">http://www.digitalflipbook.com/archives/flash/</a><br>
><br>
> Something like this may work. It is following the idea in the article,<br>
> to basically invert the color transform on the<br>
> movieclip containing the text field, and then set the text foreground<br>
> and background color to the inverse of what you want.<br>
><br>
> I just did this by experimenting with black and white, ideally you<br>
> would use something based on their<br>
> approach of actually inverting the colors using the color transform based<br>
> on the<br>
> foreground and bgcolor of the textfield that you desire.<br>
><br>
><br>
> <canvas><br>
> <simplelayout axis="y"/><br>
> <class name="myinputtext" extends="inputtext" ><br>
> <handler name="oninit"><br>
> var field = this.sprite.__LZtextclip;<br>
> field.backgroundColor = 0xffffff;<br>
> field.textColor = 0x000000;<br>
><br>
> // invert the color transform for the sprite<br>
> var colorTrans = {<br>
> ra: -100,// is the percentage for the red component (-100 to<br>
> 100).<br>
> rb: 0xd3,// is the offset for the red component (-255 to 255).<br>
> ga: -100, // is the percentage for the green component<br>
> (-100 to 100).<br>
> gb: 0xd3, // is the offset for the green component (-255 to<br>
> 255).<br>
> ba: -100,// is the percentage for the blue component (-100 to<br>
> 100).<br>
> bb: 0xd3,// is the offset for the blue component (-255 to 255).<br>
> aa: 100,// is the percentage for alpha (-100 to 100).<br>
> ab: 0 // is the offset for alpha (-255 to 255).<br>
> };<br>
> this.sprite.setColorTransform<br>
> (colorTrans);<br>
> </handler><br>
> </class><br>
> <myinputtext name="field" width="300" fgcolor="0xFFFFFF"<br>
> bgcolor="0x000000" height="30" fontsize="13">Is this selection<br>
> visible?</myinputtext><br>
> <myinputtext name="field2" width="300" fgcolor="0x999999"<br>
> bgcolor="0x333333" height="30" fontsize="13">Is this selection<br>
> visible?</myinputtext><br>
><br>
><br>
> </canvas><br>
><br>
><br>
> On Mon, Apr 14, 2008 at 5:02 PM, Greg Denton <<a href="mailto:greg.denton@gmail.com">greg.denton@gmail.com</a>> wrote:<br>
><br>
><br>
> > My app changes the color of text depending on what the text is. When<br>
> > it changes to a lighter shade of gray (via setColor) the hiliting, or<br>
> > whatever the background color is called when chars are selected, is<br>
> > automatically changed to the same gray and completely masks the text.<br>
> > Can't figure out how to fix this. And, the textselectedcolor,<br>
> > texthilitecolor in the component styles don't seem to work with<br>
> > edittext. Running on <a href="http://4.0.11." target="_blank">4.0.11.</a> Thanks for any tips.<br>
> ><br>
><br>
><br>
><br>
><br>
> --<br>
> Henry Minsky<br>
> Software Architect<br>
> <a href="mailto:hminsky@laszlosystems.com">hminsky@laszlosystems.com</a><br>
><br>
><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>