RTStyledLabel

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

RTStyledLabel

Peter Uhnak
Hi,

I've added RTStyledLabel which supports TextEmphasis.

RTGeneralExample>>styledLabel
~~~~~~~~~~~~~~
| v shape el all |
v := RTView new.
(shape := RTStyledLabel new) color: Color black.

#(normal italic bold underlined struckOut) do: [ :each |
    el := shape
    emphasis: (TextEmphasis perform: each);
    elementOn: each.
    v add: el ].

all := shape
    emphasis: { TextEmphasis bold. TextEmphasis italic. TextEmphasis underlined};
    elementOn: 'bold + italic + underlined'.
v add: all.

RTVerticalLineLayout on: v elements.

v open
~~~~~~~~~~~~~~~~~~~~~



Peter

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] RTStyledLabel

abergel
Really cool!
I am currently traveling. I will have a look at it!

Thanks!
Alexandre


> On Sep 19, 2015, at 11:24 AM, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> I've added RTStyledLabel which supports TextEmphasis.
>
> RTGeneralExample>>styledLabel
> ~~~~~~~~~~~~~~
> | v shape el all |
> v := RTView new.
> (shape := RTStyledLabel new) color: Color black.
>
> #(normal italic bold underlined struckOut) do: [ :each |
>     el := shape
>     emphasis: (TextEmphasis perform: each);
>     elementOn: each.
>     v add: el ].
>
> all := shape
>     emphasis: { TextEmphasis bold. TextEmphasis italic. TextEmphasis underlined};
>     elementOn: 'bold + italic + underlined'.
> v add: all.
>
> RTVerticalLineLayout on: v elements.
>
> v open
> ~~~~~~~~~~~~~~~~~~~~~
>
> <2015-09-19_16:23:34.png>
> ​
> Peter

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: [Pharo-users] RTStyledLabel

abergel
In reply to this post by Peter Uhnak
Just tried it.
Gorgeous!!!

Thanks!!!

Alexandre


> On Sep 19, 2015, at 11:24 AM, Peter Uhnák <[hidden email]> wrote:
>
> Hi,
>
> I've added RTStyledLabel which supports TextEmphasis.
>
> RTGeneralExample>>styledLabel
> ~~~~~~~~~~~~~~
> | v shape el all |
> v := RTView new.
> (shape := RTStyledLabel new) color: Color black.
>
> #(normal italic bold underlined struckOut) do: [ :each |
>     el := shape
>     emphasis: (TextEmphasis perform: each);
>     elementOn: each.
>     v add: el ].
>
> all := shape
>     emphasis: { TextEmphasis bold. TextEmphasis italic. TextEmphasis underlined};
>     elementOn: 'bold + italic + underlined'.
> v add: all.
>
> RTVerticalLineLayout on: v elements.
>
> v open
> ~~~~~~~~~~~~~~~~~~~~~
>
> <2015-09-19_16:23:34.png>
> ​
> Peter

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev