[Laszlo-dev] text attributes problems
Benjamin Shine
ben at laszlosystems.com
Mon Aug 14 15:43:41 EDT 2006
I think custom delegates would do it, but there is almost certainly a
simpler/better implementation if we do a bit of research.
Flash 7 & higher support CSS text formatting. DHTML browsers support
CSS text formatting. CSS text formatting is a strange beast with many
heads.
I think that we should consider replacing (or extending) our <format
font="..."> implementation of styled text with a native-CSS-based
text API.
On Aug 13, 2006, at 3:45 PM, P T Withington wrote:
> Is this just a matter of defining the setters?
>
> LzText.prototype.setters.color = 'setColor';
>
> On 2006-08-12, at 22:23 EDT, Benjamin Shine wrote:
>
>> Discussed herein:
>> http://jira.openlaszlo.org/jira/browse/LPP-553 : can't setAttribute()
>> many text attributes
>>
>> http://jira.openlaszlo.org/jira/browse/LPP-436 : fgcolor not
>> available for "text" component
>>
>> CSS users expect lots of control over text properties -- at least
>> text color. However, our current support for text color is weird. The
>> normal setAttribute("attrname", val) doesn't provide a way to set
>> font color; you have to use the special setColor call.
>>
>> The way to set the text color for an LzText instance is is to call
>> LzText.setColor(color_as_number);
>> which looks like this:
>>
>> LzText.prototype.setColor = function ( c ){
>> this.colorstring = "#" + c.toString( 16 );
>> this.setFormat();
>> this.setText( this.getText() );
>> }
>>
>> I can special case text color for the runtime CSS implementation,
>> but, yuck! These are marked as fix for seaswirl; any chance this
>> could get bumped up so it's in better shape for 3.4?
>>
>> -ben
>>
>>
>> _______________________________________________
>> Laszlo-dev mailing list
>> Laszlo-dev at openlaszlo.org
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
More information about the Laszlo-dev
mailing list