Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-04

More simple way to add control icons?

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Alberto Narduzzi
to Zaher Dirkey

Maybe I don't get you but...

Is there more simple way to add control icons to my package using new resource style in FPC 2.4 like this {$R 'images\TNewEdit.png'}

if this is possible, what else do you happen to have in mind?

anyway, maybe you can use a TImageList (or whatever it's called), populate at design-time with your images; then access the "resource" from the list using its index.
(this is usually what I do if I need images in my projects, when they are the same size. If they are not, I just fill an array/named-list and access it via const-names; I use config-files as well to populate the images, so that a user can easily redefine his images; this is a very little payload, but provides you great flexibility with once-written code)

Just my 2c for it.

Cheers, A.

Reply by email

Zaher Dirkey
to Alberto Narduzzi

I made some components and put it in package, for example TNewEdit, this component need a image i draw it as TNewEdit.png and convert it by using lazres utility to LRS file then add LRS file to the package.

Just i think i can ask a feature request to just add that image directly to my package without convert it to LRS, or there is more simple way to add that image.

Thanks

Zaher Dirkey -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100408/38137fe8/attachment.html>

Reply by email

Mattias Gaertner
to Zaher Dirkey
Show quoted text 7 lines
I made some components and put it in package, for example TNewEdit, this component need a image i draw it as TNewEdit.png and convert it by using lazres utility to LRS file then add LRS file to the package. Just i think i can ask a feature request to just add that image directly to my package without convert it to LRS, or there is more simple way to add that image.

Feel free to implement a resource editor.

Maybe you find something here:
http://wiki.lazarus.freepascal.org/Components_and_Code_examples

For example the LRS explorer.

Mattias

Reply by email