dragdata[html], clipboarddata[html] question
Ron
rbarber at yhb.att.ne.jp
Thu Jul 24 04:15:18 EDT 2003
Hi Jan
>> The problem is that text dragged or copied from a
>> fld will not maintain the
>> textfont property correctly when the fld has the
>> textfont set by script.
>> Thus the dragdata[html] [rtf] and
>> clipboarddata[html] [rtf] do not report
>> the correct data either.
>>
>> To reproduce this:
>> set the textfont of fld 1 to "not the default font
>> of the stack"
>> set the text to mytext
>>
>> Now, select some text and drag it to another fld, or
>> copy and paste it. The
>> resulting text is in the default font of the stack,
>> not the textfont
>> reported of the original fld.
>>
>> Now, select all in fld 1. Explicitly set the
>> textfont from the menu. Then
>> drag or copy and paste. The textfont is correctly
>> maintained (and reported
>> in dragdata and clipboarddata)
>>
> I would say it behaves as expected : the rendering
> hierarchy of Revolution checks the font settings all
> the way back to the mainStack's textFont, textSize and
> textStyle properties to ultimately decide how text
> will look.
> Thus when you set the htmlText of field 1 to the
> htmlText of field 2, and the textFont setting in field
> 1 is different from the textFont setting of field 2 ;
> it will now be shown with the textFont of field 1,
> except in those spots where the textFont was set at
> chunk level.
I am aware of this procedure and use it to my advantage when setting the
htmltext of flds. However, I think it is different from what I tried above.
The textfont of dragged text does not maintain its textfont in my test. It
will maintain its textfont when the text has been selected and changed
explictly, but not when the fld's textfont was set by script. Try the test
above and see what happens.
Thanks
Ron
More information about the use-livecode
mailing list