icons in pluggablelistmorph

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

icons in pluggablelistmorph

Tudor Girba-3
Hi,

I would like to specify an icon in a PluggableListMorph, but I cannot  
find my way :). Can anyone tell me how to do it?

Cheers,
Doru

--
www.tudorgirba.com

"Problem solving efficiency grows with the abstractness level of  
problem understanding."




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: icons in pluggablelistmorph

Alexandre Bergel
Maybe you can have a look at how OB does. By overriding the  
OBNode>>icon, an icon appears on left to the item name.

Cheers,
Alexandre


On 11 Sep 2009, at 14:13, Tudor Girba wrote:

> Hi,
>
> I would like to specify an icon in a PluggableListMorph, but I cannot
> find my way :). Can anyone tell me how to do it?
>
> Cheers,
> Doru
>
> --
> www.tudorgirba.com
>
> "Problem solving efficiency grows with the abstractness level of
> problem understanding."
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

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






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: icons in pluggablelistmorph

Lukas Renggli
In reply to this post by Tudor Girba-3
> I would like to specify an icon in a PluggableListMorph, but I cannot
> find my way :). Can anyone tell me how to do it?

You need to create a subclass of PluggableListMorph and LazyListMorph,
override #listMorphClass in the PluggableListMorph to return the lazy
morph class, and override the method #display:atRow:on: in the
LazyListMorph subclass to customize the low-level drawing of the list
item.

As you imagined all pretty simple and strait-forward, have a look at
the OB-Morphic for an example :-)

Cheers,
Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: icons in pluggablelistmorph

Stéphane Ducasse
In reply to this post by Tudor Girba-3
doru

do you also need to do what lukas suggested with the tree of alain?
Is there a reason not to use it?

Stef
On Sep 11, 2009, at 8:13 PM, Tudor Girba wrote:

> Hi,
>
> I would like to specify an icon in a PluggableListMorph, but I cannot
> find my way :). Can anyone tell me how to do it?
>
> Cheers,
> Doru
>
> --
> www.tudorgirba.com
>
> "Problem solving efficiency grows with the abstractness level of
> problem understanding."
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: icons in pluggablelistmorph

Tudor Girba-3
Hi Stef,

The MorphTreeMorph widget of Alain follows a different design and  
already provides a straightforward way to deal with icons.

I already use it for displaying trees in Glamour. But, that tree  
widget appears to be significantly slower for displaying simple lists.  
That is why I want to try with PluggableListMorph to see what can be  
done and with what performance.

Cheers,
Doru


On 11 Sep 2009, at 20:40, Stéphane Ducasse wrote:

> doru
>
> do you also need to do what lukas suggested with the tree of alain?
> Is there a reason not to use it?
>
> Stef
> On Sep 11, 2009, at 8:13 PM, Tudor Girba wrote:
>
>> Hi,
>>
>> I would like to specify an icon in a PluggableListMorph, but I cannot
>> find my way :). Can anyone tell me how to do it?
>>
>> Cheers,
>> Doru
>>
>> --
>> www.tudorgirba.com
>>
>> "Problem solving efficiency grows with the abstractness level of
>> problem understanding."
>>
>>
>>
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"Being happy is a matter of choice."




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: icons in pluggablelistmorph

Tudor Girba-3
In reply to this post by Lukas Renggli
Thanks Lukas. Indeed, it is straightforward :).

I will give it a try.

Cheers,
Doru


On 11 Sep 2009, at 20:28, Lukas Renggli wrote:

>> I would like to specify an icon in a PluggableListMorph, but I cannot
>> find my way :). Can anyone tell me how to do it?
>
> You need to create a subclass of PluggableListMorph and LazyListMorph,
> override #listMorphClass in the PluggableListMorph to return the lazy
> morph class, and override the method #display:atRow:on: in the
> LazyListMorph subclass to customize the low-level drawing of the list
> item.
>
> As you imagined all pretty simple and strait-forward, have a look at
> the OB-Morphic for an example :-)
>
> Cheers,
> Lukas
>
> --  
> Lukas Renggli
> http://www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

--
www.tudorgirba.com

"If you interrupt the barber while he is cutting your hair, you will  
end up with a messy haircut."


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: icons in pluggablelistmorph

Gary Chambers-4
There's always Polymorph's PluggableIconListMorph...
Should do what you need.

Regards, Gary

----- Original Message -----
From: "Tudor Girba" <[hidden email]>
To: <[hidden email]>
Sent: Friday, September 11, 2009 9:12 PM
Subject: Re: [Pharo-project] icons in pluggablelistmorph


> Thanks Lukas. Indeed, it is straightforward :).
>
> I will give it a try.
>
> Cheers,
> Doru
>
>
> On 11 Sep 2009, at 20:28, Lukas Renggli wrote:
>
>>> I would like to specify an icon in a PluggableListMorph, but I cannot
>>> find my way :). Can anyone tell me how to do it?
>>
>> You need to create a subclass of PluggableListMorph and LazyListMorph,
>> override #listMorphClass in the PluggableListMorph to return the lazy
>> morph class, and override the method #display:atRow:on: in the
>> LazyListMorph subclass to customize the low-level drawing of the list
>> item.
>>
>> As you imagined all pretty simple and strait-forward, have a look at
>> the OB-Morphic for an example :-)
>>
>> Cheers,
>> Lukas
>>
>> --  
>> Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>> _______________________________________________
>> Pharo-project mailing list
>> [hidden email]
>> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>
> --
> www.tudorgirba.com
>
> "If you interrupt the barber while he is cutting your hair, you will  
> end up with a messy haircut."
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project