I need to draw a different icon/text depending on the situation. So the question is how can I draw an image morph, or a form in an easy way.
Uko > On 27 Mar 2015, at 11:43, Peter Uhnák <[email protected]> wrote: > > Not sure if this will be of much help, but as far as icons go I used this to > generate my custom icons > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~ > | dir files theme | > dir := '/home/peter/prog/dynacase/icons' asFileReference. > files := (dir allFiles select: [ :each | each extension = 'png' ]) > collect: [ :each | each base ]. > theme := ThemeIcons current. > files do: [ :each | theme createIconMethodsFromFile: each directory: > dir ] > ~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > This generates xyIconContents and xyIcon in current ThemeIcons. So you could > probably check the implementation of createIconMethodsFromFile:directory: and > bend it to your needs. > > Peter > > On Fri, Mar 27, 2015 at 11:14 AM, Yuriy Tymchuk <[email protected] > <mailto:[email protected]>> wrote: > Hi, I want to create a custom icon for a list or tab. I can create a simple > shape morph and add a text to it, but how do I convert it into an image morph > or form? And is it ok to build such things with morphs? > > Uko > > P.S. I need to change text on image, so static graphic will not work. >
