>> * getting an icon would require someting like: >> IDEImageToImageList(MyImageList , iiDocumentOpen); > > IDEImageToImageList sounds as if an IDE image is converted to an > Imagelist. > What does it do?
It's now superseeded by this function: function GetIDEImage(ImageType: TIDEImageTypeSet): TBitmap; It's a more pragmatic approach of what you are suggesting (TImageList descendant), but it's a start. To be honest I was thinking of doing the same as you suggest, but I don't have the time nor the knowledge to properly implement this. I have a fully working "implementation" that I'm glad to share. If you want I can send a zip of it to you or the list or anyone else interest. How does it work? - add an entry to ideimage.xml "<Item1 Size="22x22" Path="\tango-icon-theme\22x22\apps" FileName="accessories-text-editor.xpm" Class="apps" Enum="iiAccessoriesTextEditor22x22"/>" - update the indexcount in ideimages.xml - create all resourcefiles by running ideres executable - start using the iiAccessoriesTextEditor22x22 in Lazarus > Create a new image list, but instead of an integer Index, using strings as > identifiers for the images. > The string image list can register themselves, so that you can access > globally with paths like 'IDE/DocumentOpen'. > Add a new published property 'ImagePath: string' to TSpeedButton, TBitBtn, > TMenuItem. > Add a property editor for this new property. > This way you can assign the icons in the designer. Only thing I would like to add to your suggestion is to use TIDEImageTypeSet instead of strings to identify an image. Think of it analogue to resourcestrings (think hard ;). The last suggestion youu make is to assign the icons at designtime right? But that would be for projects not for the IDE I suppose. One thing I'm not sure of is that if you change at designtime then you must be sure that changes are globally. That is why I use an XML file and create resourcefiles from it that are linked in the binary. Darius _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives