Jump to content

UniNativeImageList as a container for icon names


gerardocrisci

Recommended Posts

I have a folder in the "files" path that contains the icons used in the program.

I do not want to load all these files into UniNativeImageList as images, creating a big dfm.

I would like UniNativeImageList to only store the relative urls,  or file names, as it does with IconCls.

I think it is more convenient to have icon files in a folder than to include them in the compiled program.

 

Everything so that Images.GetImageDefaultUrl (FImageIndex) returns the stored url and not the url of the cached icon.

 

In addition, add a property such as FornatUrlIconPath.

that in order for the GetImageDefaultUrl result to be formatted.

example:

an item with the file name "Home"

and with FornatUrlIconPath = "/ files/32x32/%s.png '

 

result: = format (FornatUrlIconPath, [item url])> "/files/32x32/Home.png '.

 


I wish I could do it and do not disturb

but even if I paid the "uniGUI Complete - Professional Edition" version

I do not have the source of uniImageList.pas

to be able to create my TUniImageListUrls


 

Thank you

 

 

 

 

Link to comment
Share on other sites

  • 2 weeks later...
you can create an event on TUniNativeImageList

 


  OnGetImageIconCls (FImageIndex);

  OnGetImageDefaultUrl (FImageIndex);


 

so you can change the results of the procedures

 

  Images.GetImageIconCls (FImageIndex);

  Images.GetImageDefaultUrl (FImageIndex);

 

or you would need a documentation of how TUniNativeImageList is done to be able to inherit the functions to be changed.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...