TsAlphaImageList delete or Clear does not work at runtime

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #36085
    SzakiLaci
    Participant

    Hi Serge,

    I'm writing a new “picture-showing” module to my program and whenever I choose a new directory and try to clear the pictures loaded previously into the ImageList,

    it's NOT clearing them. (Took me 3 days for searching 3000 lines of my programcode until realized the error is in AC 🙁 ) I've tried everything now…

    Maybe it's important: – there is 1 TsVirtualImageList attached to it too!

    1. When I have tried this way:

    Code:
    ikon_Lista.Clear;

    nothing happened.

    Code:
    (ikon_Lista.Count = 0; BUT ikonLista.Items.Count= stayed 407)

    2.

    Code:
    for d := ikon_Lista.Count-1 downto 0 do
    ikon_Lista.Delete(d);

    This way > deleting 1 item from 407 took ca. 5 seconds !!! (All together more minutes)

    … so I've enclosed it between AcBegin/endUpdate , and that solved the slowness.

    Code:
    vIkonLista.AcBeginUpdate;
    ikon_Lista.AcBeginUpdate;

    vIkonLista.ClearItems; // <- I have to clear cache from virtualList myself too ... I guess
    for d := ikon_Lista.Count-1 downto 0 do
    ikon_Lista.Delete(d);
    ikon_Lista.Clear;

    vIkonLista.AcEndUpdate(False);
    ikon_Lista.AcEndUpdate(False);

    But still not working 🙁 … keeping all pictures

    Please FIX IT quickly ! Thank you 😉

    PS: Originally I've compiled with old, stable version (2013 v8.42 b594) … so I've just upgraded to newest beta (2014 v9.03 b690) but no change.

    #51879
    SzakiLaci
    Participant

    Hi again,

    I've just found an other error:

    Tried to recompile the “VirtualImageList DEMO” you've sent me in 2012.dec. with the newest component pack …

    and the .dfm file suddenly increased from 2927 Kbyte > to 9461 Kbyte. Also the compiled EXE increased 3x bigger.

    Looked into it, and realized it saves a HUGE BMP file :

    Code:

    object sVirtualImageList1: TsVirtualImageList
    Height = 128
    Width = 128
    AlphaImageList = sAlphaImageList1
    UseCache = False
    Left = 368
    Top = 136
    Bitmap = {
    494C010128002C00040080008000FFFFFFFF2100FFFFFFFFFFFFFFFF424D3600
    0000000000003600000028000000000200008005000001002000000000000000
    2C00000000000000000000000000000000000000000000000000000000000000
    0000000000000000000000000000000000000000000000000000000000000000
    #52059
    Support
    Keymaster

    Hello

    It's fixed, will be published very soon.

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