TsAlphaImageList could solve a long awaited problem

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36993
    HeDiBo
    Participant

    Because TsAlphaImageList stores the filename as a sort of symbolic ID, how nice would it be to have the following property:

    Code:
    TsAlphaImageList
    private
    function GetItem(SymbolicLabel: String): TsImgListItem;
    .
    .

    published
    property ItemByName[SymbolicLabel: String]: TsImgListItem read GetItem;
    .
    .
    end;

    Then, in all controls of AlphaControls, when there is an ImageList as a property, the image could also be retrieved with a new property: ItemName (like ItemIndex, but now symbolic).

    Gone are the ugly ItemIndex references, that only work if you never alter the images sequence in the image list. At the same time it would nicely document what the image selected from the image list is used for.

    #55111
    Support
    Keymaster

    Interesting idea, I will think about it, thanks )

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