On Fri, 16 Jun 2006 12:37:10 +0200
Giuliano Colla <[EMAIL PROTECTED]> wrote:

> Mattias Gaertner ha scritto:On Thu, 15 Jun 2006 18:59:51 +0200
> Giuliano Colla <[EMAIL PROTECTED]> wrote:
> 
>   I have a number of custom components which I've installed on an "Extra" 
> tab on the IDE toolbar.
> I've tried the method described in the /components/custom directory, and 
> many variations on the theme, but the net result is always the same: 
> only the default icon is shown, so that all my components look the same. 
> Could someone point me on the right direction?
>     
> The method described /components/custom/README is obsolete and not
> supported. Please create a package instead and add your components.
> The only thing, that is still valid is the text, how to add an icon.
> The IDE uses as icon the lazarus resource of the classname. For example it
> searches a resource named 'tbutton' for TButton. The resource can be a xpm
> or bmp. You create the resource with the lazres tool. The lazres tool
> creates an include files.
> 
> 1. open a paint program and create an icon (up to 23x23), say
> tyourcomponent.xpm.
> 2. Use lazres tool: /path/to/lazatus/tools/lazres yourchoice.lrs
> tyourcomponent.xpm.
> 3. include yourchoice.lrs in an initialization section: {$I
> yourchoice.lrs}.
> 
>    Thanks.
> 
> Some more questions, to avoid fiddling too much.
> 
> My package includes four components, and four units. Should I have a
> registration procedure in each unit and include an individual .lrs file in
> the initialization section of each unit, or should I have another unit
> which does registration and includes the resources for all of them?

Your choice.

 
> Names are case sensitive? I mean: for the component called TBitBtn1, the
> unit is called tbitbtn1.pas. The icon should be called TBitBtn1.xpm ot
> tbitbtn1.xpm? Thanks again

Names are case insensitive.
The only exception are filenames. Filenames must be exact case, lowercase or
uppercase.


Mattias

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to