How to add icon to a class?

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

How to add icon to a class?

Costas Menico-2
I am trying to figure out with no success on how to add an icon to a
class for an external ico file. Is this something that should be
straightforward?

Costas


Reply | Threaded
Open this post in threaded view
|

Re: How to add icon to a class?

Howard Oh
Costas Menico <[hidden email]>ÀÌ(°¡) ¾Æ·¡ ¸Þ½ÃÁö¸¦
news:[hidden email]¿¡ °Ô½ÃÇÏ¿´½À´Ï´Ù.
> I am trying to figure out with no success on how to add an icon to a
> class for an external ico file. Is this something that should be
> straightforward?
>
> Costas

Costas,

It's really simple.
Add a class method #icon to your class
MyClass>>icon

    ^Icon fromFile: 'c:\my documents\newicon.ico'

'c:\my documents\newicon.ico' is an example of a path to the
icon. You may set proper path instead of that.
One thing you should be careful is that the path should better be
absolute path rather than a relative path.
Relative path sometimes cause some orientation problem
therefor files may not be loaded.

Hwa Jong Oh