[Pharo-dev] StringMorph removing Text styling

Peter Uhnák i.uhnak at gmail.com
Wed Oct 18 09:28:34 EDT 2017


There's a cursor issue though... when you have TextMorphs in e.g. list
(FastTable), then the cursor changes to text selection, that's why I wanted
to use StringMorph.

So maybe renaming (subclassing?) StringMorph to LabelMorph to make it more
clear?

Peter

On Wed, Oct 18, 2017 at 1:30 PM, Pavel Krivanek <pavel.krivanek at gmail.com>
wrote:

> Personally I would expect that the second version should be fixed to
> discard formatting. We have the TextMorph for such cases.
>
> -- Pavel
>
> 2017-10-18 11:40 GMT+02:00 Peter Uhnák <i.uhnak at gmail.com>:
>
>> Hi,
>>
>> I am not sure if this is a bug or a feature, but converting Text to
>> StringMorph clears some of the formating.
>>
>> Compare:
>>
>> |text|
>> text := 'hello' asText makeAllColor: Color red.
>>
>> text asStringMorph openInWindow. "no color"
>> (StringMorph contents: text) openInWindow. "with color"
>>
>> Bug? Feature?
>>
>> Thanks,
>> Peter
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20171018/7dcdadf3/attachment-0002.html>


More information about the Pharo-dev mailing list