Getting Icon by Index

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #33040
    skippy
    Participant

    Hi,

    I want to use glyphs of TsSpeedButton depending of the size of the button. The idea is to create one Icon File with say three icons each of different size (e.g. 32×32 / 48×48 / 64×64). Depending of the button size (or glyph size) I want to load the appropriate icon. TIcon is a very poor component and cannot access icons with a certain index, just SMALL and HUGE Icon. Does anyone know how to do that task ?

    Rgds, Skippy.

    #39582
    skippy
    Participant

    Ok, it can be made by using LoadImage with the appropriate xDesired and yDesired sizes, it loads the relevant icon.
    As for the bad resolution I assumed it loads another one and draws by stretching. But this is not true, I tested it with different icons now. But I don't know why the resolution is such bad, it's pretty good in the icon designer. When I use png files it's perfect, but then I have to use different files for the different sizes….

    Rgds,

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.