Forum > LCL

[SOLVED] [Icon theme

(1/2) > >>

Pe3s:
Hello, I would like to write the ability to change icons in the program and save the icons theme to an ini file.
I thought to load all the icons into the icon list and change the index and write to ini, is there another option?
I can ask for hints

Handoko:
Option for what? Did you mean for storing the theme settings? If yes, you can use TRegistry too.

https://wiki.freepascal.org/fcl-registry

Pe3s:
I was thinking if it is possible to change the theme of the icons in a different way

Handoko:
Your concept should work. But you may want to let user to add new icons or pictures. If yes, you should learn "How to load a TImagelist at run time" in the Graphics section in the link below:

https://wiki.freepascal.org/Portal:HowTo_Demos#Graphics

But before you use that image, you need to check and make sure that image's size is suitable for use in the GUI.

lainz:
Better do this way:

[Theme]
0=image1.png
1=icon3.png
...

And load each image in the index. This way you don't load all images on the image list. And these images are not fixed to the images you provide. The indexes are fixed that's good too.

Navigation

[0] Message Index

[#] Next page

Go to full version