text pane in Glamour

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

text pane in Glamour

Nicolas Anquetil

I have a text pane in a Glamour browser:

browser transmit from: #A; to: #B; andShow: [ :a |
    a text
      title: [ :c | c name, ' source'];
      display: [  :c | c sourceText ].
 ].

is it possible to programatically highlight a given line in this text?
May be by selecting it?

How can it be done?

nicolas

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

Re: text pane in Glamour

abergel
I have closely checked, by if you have a text (and not a string), then you can use TextAttribute to color the text.

Alexandre

 
On 14 Oct 2011, at 16:53, Nicolas Anquetil wrote:

>
> I have a text pane in a Glamour browser:
>
> browser transmit from: #A; to: #B; andShow: [ :a |
>     a text
>       title: [ :c | c name, ' source'];
>       display: [  :c | c sourceText ].
>  ].
>
> is it possible to programatically highlight a given line in this text?
> May be by selecting it?
>
> How can it be done?
>
> nicolas
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
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: text pane in Glamour

Tudor Girba-2
It depends on what you want.

If you are interested only in something like text highlighting, you can do what Alex is saying: use a Text and play with TextAttribute. For an example, in the #format: you can say something like:

Text string: string attribute: TextColor red


However, if you want to select something based on what happens in the browser, you can use the special ports in the text presentation.

You can see two examples of playing with these ports in GLMBasicExamples:

GLMBasicExamples new textPortsExamples openOn: 'Type and select to see the results previewed.'.
GLMBasicExamples new textSelection openOn: (1 to: 100).

Cheers,
Doru


On 14 Oct 2011, at 22:05, Alexandre Bergel wrote:

> I have closely checked, by if you have a text (and not a string), then you can use TextAttribute to color the text.
>
> Alexandre
>
>
> On 14 Oct 2011, at 16:53, Nicolas Anquetil wrote:
>
>>
>> I have a text pane in a Glamour browser:
>>
>> browser transmit from: #A; to: #B; andShow: [ :a |
>>    a text
>>      title: [ :c | c name, ' source'];
>>      display: [  :c | c sourceText ].
>> ].
>>
>> is it possible to programatically highlight a given line in this text?
>> May be by selecting it?
>>
>> How can it be done?
>>
>> nicolas
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
www.tudorgirba.com

"Presenting is storytelling."


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